Question: Create a C++ program that accomplishes the following: a. Create a class called vehicleType that has the following members: Public members: -A function called getCost

Create a C++ program that accomplishes the following: a. Create a class called vehicleType that has the following members: Public members: -A function called getCost that returns the cost of the vehicle -A function called setCost to set the cost of the vehicle Private members -A private member called cost b. Create a class called carType that uses vehicleType as its base class. This class will have the following members: Public members: . A function called setStyle to set the style . A function called setColor to set the color . A function called GetStyle that returns the style . A function called GetColor that returns the color . Default constructor . Parameters constructor (you should be able to pass all the information into the constructor and create a car with such information) Private members: . A variable called style . A variable called color . A variable called License_Plate *Create all the functions and constructors' definitions. *** c. Test your classes: . Create instances of your carType class. . Retrieve all the information about a car (color, style, cost, License Plate)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
