Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++

image text in transcribed

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

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

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

( 2 ) ^ logn = \ Theta ( n ) Is it true or false? True False

Answered: 1 week ago