Question: Write the code in c++.Kindly use the given details; Your implemented class must fully provide the definitions of following class (interface) functions. Please also write

Write the code in c++.Kindly use the given details;

Your implemented class must fully provide the definitions of following class (interface) functions. Please also write down the test code to drive your class implementation.

class Vehicle{ private: // think about the private data members... public: // provide definitions of following functions...

Vehicle();// default constructor Vehicle(char *str); Vehicle(double); Vehicle(const Vehicle &); //implement mutators for all private data members //implement accessors for all private data members //you have to implement the following functions // think about the parameters required and return type of the following functions addVehicle();//adds a new vechile ageOfVehicle();//returns age of vehicle on the basis of year passed getVehicleDetails();//return detail of vehicle getVehicleDetailsAtIndex();//return detail of vehicle stored at certain index isMatching();//returns true if passed vehicle matches with it returnByMake();//returns the array of vehicles of specific make returnByValue();//returns the array of vehicles of specific value returnByYear();//returns the array of vehicles of specific year vehicleSold();//deletes the specific vehicle once its sold ~Vehicle(); }; int main(){ /you to create N vehicles objects for the car dealer }

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!