Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Case Study Car Dealership ABC Car Dealership needs your help to update the order

ID: 3538780 • Letter: C

Question

Case Study Car

Dealership

ABC Car Dealership needs your help to update the ordering system. This car dealer is selling

four types of vehicles: Sedan, Truck, SUV, and mini Van. And each type of vehicle can have

several options: sunroof, security, entertainment, and advanced safety feature. As each vehicle

can be equipped with none or more options, and even the same option (e.g. sunroof) can be

added twice to the same vehicle. The software needs to be able calculate the total price

accurately (base price + prices of installed options). You will need to design classes such that

the software can be easily maintained.

Before writing the actual client application (i.e. main()), be sure your classes should provide

enough interface functions that allow the complete client application to be written.



Explanation / Answer

#include<iostream>

using namespace std;


class Sedan()

{

int base=1000,a1,b2,c3,d3;

char a[10][10];

Sedan()

{

cout<<"Enter the parts u want to install and how many:";

cin>>a>>a1;

}

};


class SUV()

{

int base=2000;

char a[10][10];

SUV()

{

cout<<"Enter the parts u want to install and how many:";

cin>>a>>a1;

}

};


class Truck()

{

int base=3000;

char a[10][10];

Truck()

{

cout<<"Enter the parts u want to install and how many:";

cin>>a>>a1;

}

};


class MiniVan()

{

int base=500;

char a[10][10];

MiniVan()

{

cout<<"Enter the parts u want to install and how many:";

cin>>a>>a1;

}

};


int main()

{

int ch

cout<<"Enter the car: 1.Sedan 2.SUV 3.Truck 4.Mini van:

cin>>ch;

switch(ch)

{

case 1:Sedan s;

break;

case 2:SUV su;

break;

case 3:Truck t;

break;

case 4:MiniVan v;

break;

default:break;

}

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote