Question: write in c++ 4. Write a class vehicle and bus, car and bicycle. Classes bus, car and bicycle should inherit from class vehicle. Attributes of
4. Write a class "vehicle" and "bus", "car" and "bicycle". Classes "bus", "car" and "bicycle" should inherit from class "vehicle". Attributes of the "vehicle" will be: name, year, color. The child classes should have the attributes: number of wheels, number of seats. In both classes should be method "show_attributes" which prints the attributes. Demonstrate in main function the usage of these classes (8 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
