Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

5. Arranging for the training facility and room.

Answered: 1 week ago

Question

1. Discuss the five types of learner outcomes.

Answered: 1 week ago