1
answer
1
watching
347
views
22 Jun 2021
- A vehicle is generally defined as a machine that transports people/luggage. Vehicles usually have
wheels, engines, seats, etc. and have common functions like starting, steering, fuel pumping, applying
brakes, etc. However, it is a very abstract concept to be precisely defined and implemented. Cars, trucks,
airplanes, trains and motorcycles are different types of vehicles that can possess specialized properties
that distinctively define their subtype. Write a C++ program to implement the vehicle hierarchy. Your
code should include pure virtual functions, overridden functions, data members, constructors, and a
main function to create objects of all classes and input/output data.
- A vehicle is generally defined as a machine that transports people/luggage. Vehicles usually have
wheels, engines, seats, etc. and have common functions like starting, steering, fuel pumping, applying
brakes, etc. However, it is a very abstract concept to be precisely defined and implemented. Cars, trucks,
airplanes, trains and motorcycles are different types of vehicles that can possess specialized properties
that distinctively define their subtype. Write a C++ program to implement the vehicle hierarchy. Your
code should include pure virtual functions, overridden functions, data members, constructors, and a
main function to create objects of all classes and input/output data.
20 Jan 2022