Question

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

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.
Your classes should include the techniques you’ve learned in class:
1. Inheritance
2. Virtual functions
3. Constants and references
4. Constant methods
5. Copy constructors
6. Dynamic memory allocation

Please use C++ to write WHOLE code including the 6 demand above(The attribute for each class clearly)!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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:\n1.Sedan\n2.SUV\n3.Truck\n4.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;

}

Add a comment
Know the answer?
Add Answer to:
ABC Car Dealership needs your help to update the ordering system. This car dealer is selling...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Picture a car dealership. There are many different types of vehicles for sale. The salespeople know...

    Picture a car dealership. There are many different types of vehicles for sale. The salespeople know every detail about every one. But the accountants inside only care that a vehicle is getting sold. Model this system: The dealer sells Hatchbacks and Sedans Every vehicle has a price Hatchbacks have 5 doors and sedans have 4 Every vehicle has a trunk. A hatchback holds 30 cu ft, a sedan 20 Lastly, every vehicle can be started Make two functions that take...

  • I need help constructing a special inventory system. I need certain components that will check the...

    I need help constructing a special inventory system. I need certain components that will check the age of the customer and then assign them to a car model. It will be business logic classes. To test your classes, you will use them in a relatively small test application. The requirements for testing and the classes within PYTHON 3 are as follows: • Need to build and design TWO components of the reservation sys. One class to represent customers, and another...

  • 1. A small car dealership operates in four different states (Florida, Georgia, Alabama, and Mississippi). The...

    1. A small car dealership operates in four different states (Florida, Georgia, Alabama, and Mississippi). The dealership owner would like to know if the 4 different types of cars that can be purchased (sport, SUV, sedan, and convertible) are purchased similarly from each state. What are the null and alternative hypotheses? Group of answer choices a. Ho: All states have the same distribution of purchases. Ha: All of the states have a different distribution b. Ho: All states do not...

  • (1)     ____ is the principle that allows you to apply your knowledge of a general category...

    (1)     ____ is the principle that allows you to apply your knowledge of a general category to more specific objects.           a.       Inheritance              c.       Encapsulation           b.       Polymorphism                    d.       Override (2)     When you create a class by making it inherit from another class, you are provided with data fields and ____ automatically.           a.       fonts                      c.       class names           b.       methods                  d.       arrays (3)     By convention, a class diagram contains the ____ following each attribute or...

  • Java - Car Dealership Hey, so i am having a little trouble with my code, so...

    Java - Car Dealership Hey, so i am having a little trouble with my code, so in my dealer class each of the setName for the salesman have errors and im not sure why. Any and all help is greatly appreciated. package app5; import java.util.Scanner; class Salesman { private int ID; private String name; private double commRate; private double totalComm; private int numberOfSales; } class Car { static int count = 0; public String year; public String model; public String...

  • I need an OUTLINE ONLY (pseudocode/comments). DO NOT DO THE PROGRAMMING ASSIGNMENT. Part I: PA3 Outline...

    I need an OUTLINE ONLY (pseudocode/comments). DO NOT DO THE PROGRAMMING ASSIGNMENT. Part I: PA3 Outline (10 points). Create an outline in comments/psuedocode for the programming assignment below. Place your comments in the appropriate files: main.cpp, functions.h, dealer.cpp, dealer.h, dealer.cpp (as noted below). Place into a file folder named LastnamePA3, the zip the content and hand in a zip file to Canvas. Part II: PA3: Car Dealership (40 points) For Programming Assignment 3 you will be creating a program to...

  • Project 7: Vehicles 1 Objective In the last couple projects, you’ve created and used objects in...

    Project 7: Vehicles 1 Objective In the last couple projects, you’ve created and used objects in interesting ways. Now you’ll get a chance to use more of what objects offer, implementing inheritance and polymorphism and seeing them in action. You’ll also get a chance to create and use abstract classes (and, perhaps, methods). After this project, you will have gotten a good survey of object-oriented programming and its potential. This project won’t have a complete UI but will have a...

  • Section 0 Problem Background A local entrepreneur has investments in property and vehicles. Recently business has...

    Section 0 Problem Background A local entrepreneur has investments in property and vehicles. Recently business has boomed and she needs object-oriented software to keep track of her current and past assets. As an OOP expert, you are tasked to write a program that keeps track of these assets. You are recommended to read through the requirements of all sections before attempting any coding. Section 1: Basic Classes • A House class with instance variables erfNumber, location, noOfRooms, etc. • Mandatory...

  • Assignment Requirements I have also attached a Class Diagram that describes the hierarchy of the inheritance...

    Assignment Requirements I have also attached a Class Diagram that describes the hierarchy of the inheritance and interface behaviors . The link to the PDF of the diagram is below MotorVehical.pdf Minimize File Preview User Define Object Assignment: Create a Intellij Project. The Intellij project will contain three user defined classes. The project will test two of the User Define Classes by using the invoking each of their methods and printing the results. You are required to create three UML...

  • Need help doing program In bold is problem E2 #include<iostream> #include<string> #include<vector> using namespace std; //Car...

    Need help doing program In bold is problem E2 #include<iostream> #include<string> #include<vector> using namespace std; //Car class //Defined enum here enum Kind{business,maintenance,other,box,tank,flat,otherFreight,chair,seater,otherPassenger}; //Defined array of strings string KIND_ARRAY[]={"business","maintenance","other,box","tank,flat","otherFreight","chair","seater","otherPassenger"}; class Car { private: string reportingMark; int carNumber; Kind kind; //changed to Kind bool loaded; string destination; public: //Defined setKind function Kind setKind(string knd) { for(int i=0;i<8;i++) //repeat upto 8 kinds { if(knd.compare(KIND_ARRAY[i])==0) //if matched in Array kind=(Kind)i; //setup that kind } return kind; } //Default constructor Car() { } //Parameterized constructor...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT