Question: use C++ Critical Thinking Exercise: Create the design for a program for a car lot. You will prompt the user for the specifications of a

use C++

use C++ Critical Thinking Exercise: Create the design for a program for

Critical Thinking Exercise: Create the design for a program for a car lot. You will prompt the user for the specifications of a car and check your inventory to see if the car is on the car lot. The inventory is found in the file CarLot.dat. You will read in the inventory using the struct Cars defined in lab 11.1, exercise 5a. You will read data from an input file named CarLot.dat into a struct variable and the user's specifications into a struct. Since you do not want to lose the customer, ask the customer if they want a list of all vehicles that match some specifications or only the exact car being searched. Hint: Since you are only reading a record at a time and you loop until the end of file flag, if you need to go through the file again, you must clear all file flags using the clear function. The following specifications apply to the cars in the lot. Valid car types include (C)oupe, (M)inivan, or (S)UV. The coupe gets 25 mpg at a base cost of S15,000, and seats 4. The minivan gets 20 mpg at a base cost of $18,000. and seats 7. The SUV gets 18 mpg at a base cost of $22,000 and seats 5. CarLot.txt C 4 25 15000 green C 4 25 15000 yellow M 7 20 18000 silver S 5 18 22000 blue S 5 18 22000 silver S 5 18 22000 green C 4 25 15000 white

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!