Question: Exercise 1: Define a class based object called vehicleType in the VehicleTypeHeader.h file that contains the member variables listed below Variable name Description make model
Exercise 1: Define a class based object called vehicleType in the VehicleTypeHeader.h file that contains the member variables listed below
| Variable name | Description |
| make | |
| model | |
| year | |
| price | Cost of the vehicle |
| color | Color of the vehicle |
| style | Coupe, sedan, SUV, truck, hatchback, etc. |
| licenseplate | Vehicle license plate number |
| type | New, used, certified |
The class should have the following constructors:
A default constructor that assigns the term "NA" to all string variable and 0 to the numerical variables.
A constructor that accepts values as arguments and assigns them to the appropriate member variables.
Write the appropriate mutator functions (setters) that store values in these member variables and accessor functions (getters) that return the values of the private member variables.
Include the additional member functions listed below:
printVehicleInfo: the member function does not take a parameter. The function displays information about a vehicle as shown below.
Make: Toyota
Model: RAV_4
Year: 2019 (used)
Price: $32158.99
== Style: SUV
== Color: Midnight_blue
== License plate number: 1234560
generateLicensePlate: the function does not take a parameter. The function should randomly generate a number between 1111111 and 9999999 and assign it to the license plate member variable.
Exercise 2: Write the member function definitions for all member functions as described in Exercise 1 of the test to a file called VehicleTypeImp.cpp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
