Question
big three: Define a vehicle class that has the following private data members: vehicles type (such as Sport, SUV, Compact, etc.) as a C++ string,
big three:
Define a vehicle class that has the following private data members: vehicles type (such as Sport, SUV, Compact, etc.) as a C++ string, wheels, and a dynamic array of driver objects. Define a driver class that hasprivate data member for a name as a C++ string. Create the appropriate constructors, accessor functions, mutator functions, and Big Three for these classes.
In the driver, write a local function, void print_vehicle_infor(vehicle v), to print the vechicle and driver information. This will print the vehicle data members and driver names.
In main, create a vehicle, ask the user for the information to set the data members for a vehicle, create the dynamic array of driver objects for the vehicle, ask the user for the information to set all the driver names, call print_vehicle_info() to print the vehicle information with driver names.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started