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

write in c++ write in c++ 4. Write a class "vehicle" and "bus", "car" and

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!