Question: Car.cpp: Two constructors ( one with and without parameters ) getters and setters for the five car fields ( 3 strings, 2 ints ) toString
Car.cpp:
Two constructors one with and without parameters
getters and setters for the five car fields strings, ints
toString which follows the formatting shown in the screenshot below
vector makeVectorint num
Creates a vector of Car pointers, with a number of emptyconstructor Car objects as specified by the num parameter
void paintVectorvector cars, string newColor
Takes the cars vector, and calls setColor on each of its members, using newColor. Since it takes a vector of pointers, it doesn't need to return anything.
All other cpp files:
Two constructors one with and without parameters
A toString function which calls the base class toString, and adds the additional class field to the output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
