I got problem with understanding the task:
“Consider the class Bicycle. Given your knowledge of some common components
of bicycle, show a class hierarchy in which the class Bicycle inherits from other
classes, which, in turn, inherit from yet other classes. Discuss the instantiation of
various objects of class Bicycle. Discuss inheritance from class Bicycle for other
closely related derived classes. Write a program that demonstrate proposed by you hierarchy.”
It’s so imprecise, that I completly don’t know what do I have to show, especially that I’ve already did one task with using showing inheritance and using virtual classes.
Could u give me some examples how do you understand that task?
Cheers.
It is a bad question: because although it’s asking about inheritance (for example, “a bicycle isa road vehicle”), it also says “your knowledge of some common components of bicycle” (for example, “a bicycle has two wheels”), which seems to me to be irrelevant to the question.