You are working for a major car manufacturer and have been tasked with creating an application to maintain vehicle inventory records for one of its dealerships.
Create a class to maintain a Dealership. A dealership has the following information that must be stored in the Dealership class: the dealership name, the maximum number of vehicles that the dealership’s lot can hold, and a
The information for each vehicle should be encapsulated in a Vehicle class and should include the vehicle’s make, model, and year. Your Dealership class should support operations (functions) to add a vehicle to the dealership’s inventory (vector) and to list all vehicle records (i.e. print out the make, model, and year of each vehicle object in the vector). Your Vehicle class should include operations to allow entry of the make, model, and year, and to return the values in these variables (In other words, you need a separate setter and getter for each data member in the Vehicle class).
You should write a main program that creates a single Dealership object and presents a menu to users that allows them to select either Add (A), List (L), or Quit (Q).
- Add should allow the user to enter a vehicle’s information (make, model, and year) and add it to the dealership’s inventory (vector) of vehicles.
- List should list all vehicle records currently in the dealership’s inventory. Remember that a vehicle record includes the make, model, and year of the vehicle.
- You should be able to add and list repeatedly, until you select Q to quit.
Use good coding style and principles for all code and input/output formatting. All data in a class must be private. Put each class declaration in its own header file and its implementation in a separate .cpp file.
Trending nowThis is a popular solution!
Step by stepSolved in 8 steps with 2 images
- a) TEMPID (Corp-ID = "Amawig") (works) b) TEMPID, City (Employee ▷ (corpan = " Amouig" (works)) c) TEmpID, City (CorpID="Amoudig" A Salary > 100000) works Employee d) EmpIn (Employee works Corporation) e) TEMPID ((Employee Amonages) MngrID = employee 2. EmpID A employee-Zipcode · Employce 2. zipcode ^ Employee.City = Employee 2. City) (Pemployeez (Employee)))arrow_forwardYou are working for a major car manufacturer and have been tasked with creating an application to maintain vehicle inventory records for one of its dealerships. Create a class to maintain a Dealership. A dealership has the following information that must be stored in the Dealership class: the dealership name, the maximum number of vehicles that the dealership’s lot can hold, and a vector of the vehicles currently on the lot. The information for each vehicle should be encapsulated in a Vehicle class and should include the vehicle’s make, model, and year. Your Dealership class should support operations (functions) to add a vehicle to the dealership’s inventory (vector) and to list all vehicle records (i.e. print out the make, model, and year of each vehicle object in the vector). Your Vehicle class should include operations to allow entry of the make, model, and year, and to return the values in these variables (In other words, you need a separate setter and getter for each data…arrow_forwardIf you have a class named Animal, give three examples of names of data fields (or attributes) you might expect this class to have.arrow_forward
- COURSE CRS_CODE DEPT_CODE CRS_DESCRIPTION CRS_CREDIT CLASS CLASS_CODE CRS_CODE CLASS_SECTION CLASS_TIME CLASS ROOM PROF_NUM 00 ENROLL CLASS_CODE STU_NUM ENROLL_GRADE STUDENT STU_NUM STU_LNAME STU_FNAME STU_INIT STU_DOB STU_HRS STU_CLASS STU_GPA STU_TRANSFER DEPT_CODE STU_PHONE PROF_NUM Review the relational diagram above and briefly describe the following in one sentence. 1. How would you extend this database to identify the Professor who taught a class? 2. How would you extend this database to identify the Department that had a course?arrow_forwardplease help me with this JAVA programming 1 assignment. You are creating a database of fey creatures found in Western Arkansas. Your data includes the creature's species, description, diet, and difficulty to catch. Include the following in your database: Species Description Diet Danger Level Times Caught Sprite Small winged humanoid berries medium 1 Goblin Common evil fey Omnivorous medium 5 Troll Large, dangerous, ugly humanoids high 1 Boggart Mischievous teleporting goblin-like creature stolen pies low 4 Gnome Small, shy, burrowing burrowing critters low 2 Dryad tree-maiden spirit tied to a forest unknown medium 0 Using one or more arrays, display this list. Modify the program so the user enters a number. Then, display all the creatures (and their info) who have been caught at least that many times. In addition to the above, allow the user to enter the name of a creature. If that creature is in the list, add one to the number of times that creature has been…arrow_forwardClass field corruption must be prevented.arrow_forward
- fast in pyth pleasearrow_forwardBackground Often, data are stored in a very compact but not human-friendly way. Think of how dishes in a menu can be stored in a restaurant database somewhere in the cloud. One way a dish object can be stored is this: { "name": "Margherita", "calories": 800, "price": 18.90, "is_vegetarian": "yes", "spicy_level": 2 } Obviously, this format is not user-readable, so the restaurant's frontend team produced many lines of code to render and display this content in a way that's more understandable to us, the restaurant users. We have a mini-version of the same task coming up. Given a list of similar complex objects (represented by Python dictionaries), display them in a user-friendly way that we'll define in these instructions. What is a "dish"? In this project, one dish item is a dictionary object that is guaranteed to have the following keys: "name": a string that stores the dish's name. "calories": an integer representing the calorie intake for one serving of the dish. "price": a float to…arrow_forwardDouble Bubble For this exercise you need to create a Bubble class and construct two instances of the Bubble object. You will then take the two Bubble objects and combine them to create a new, larger combined Bubble object. This will be done using functions that take in these Bubble objects as parameters. The Bubble class contains one data member, radius_, and the corresponding accessor and mutator methods for radius_, GetRadius and SetRadius. Create a member function called CalculateVolume that computes for the volume of a bubble (sphere). Use the value 3.1415 for PI. Your main function has some skeleton code that asks the user for the radius of two bubbles. You will use this to create the two Bubble objects. You will create a CombineBubbles function that receives two references (two Bubble objects) and returns a Bubble object. Combining bubbles simply means creating a new Bubble object whose radius is the sum of the two Bubble objects' radii. Take note that the CombineBubbles function…arrow_forward
- Data may be stored in the attributes field of objects. The class's characteristics are the class's own.?arrow_forwardCreate a class of any domain i.e. university, showroom, student, shop. Also mention attributes for them and initialize the values using constructor and show the values for each object using custom function (out side the class) hint: min no of objects 2arrow_forwardClass field corruption must be prevented.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY