4 ms·
I would like to see one. Ideally one that has the functional programmer rewrite things. I don't have any bias besides being completely ignorant about classes. T
by 6510 4y ago
I would like to see one. Ideally one that has the functional programmer rewrite things. I don't have any bias besides being completely ignorant about classes. The tutorials do talk to me about cars being a sub class of vehicles and the prevention of rewriting things. My mind goes like: "Hierarchies? seems bad?: You have buildings and vehicles with cars belonging to vehicles and habitats belonging to buildings. Where put the RV? Are writers children of nationality or is nationality a child of writer?" iow the example is probably to unrelated to programming to be a sensible one.
- charcircuit 4y ago>Where put the RV? Both. You can have a RVVehicle class and a RVHabitat class. Nothing is forcing you to have 1 class. If it makes more sense to be just one class you can also make it a subclass of 2 classes. >Are writers children of nationality or is nationality a child of writer? Nationality would be a child of writer.
- bazoom42 4y ago> Are writers children of nationality or is nationality a child of writer? Wouldnt that be a has-a relationship? Represented by composition rater than inheritance.