Question: Lab 7 Problem Description Your team will develop a solution for a car dealership. The program includes two classes, Dealer and Car, and all car

Lab 7 Problem Description
Your team will develop a solution for a car dealership. The program includes two classes, Dealer and Car, and all car objects are created by the Dealer object. The fields and methods required for each class are:
class Dealer
private:
int cars // The number of cars in inventory
string name // The name of the dealership
Car** inventory // The dealership's inventory
size_t brandLength // the size of the brand field
void setBrandLength(string, bool)// compares the length of the parameter +//2 with the current value for brandlength. Changes the value of the field // if the value of the parameter +2 is greater than the current value. If // the second parameter is true, checks the inventory array for the size of // the largest brand length, and assigns it to brandLength if the value found // is smaller
size_t modellength // the size of the model field
void setModelLength(string, bool)// compares the length of the parameter +2// with the current value for modellength. Changes the value of the field if // the value of the parameter +2 is greater than the current value. If the // second parameter is true, checks the inventory array for the size of the // largest model length, and assigns it to modelLength if the value found is // smaller
void orderInventory()
// Orders the cars in inventory alphabetically, first by brand // name, then by model name, and then by serial number.
public:
Dealer()// initializes numeric fields to , name to the
// empty string, and inventory to the null pointer
Dealer(string)// initializes numeric fields to , name to
// the parameter's value, and inventory to the null pointer
Dealer (const Dealer&)// the copy constructor
Dealer ()// the destructor
size_t getBrandLength() const // returns the value of the brandLength field size_t getModelLength() const // returns the value of the modellength field int getCarCount() const // returns the value of the cars field
void addCar(string, string)// Receives a car's brand and model as
 Lab 7 Problem Description Your team will develop a solution for

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!