Fill This Form To Receive Instant Help
Homework answers / question archive / C++ ALL FUNCTION HEADERS MUST HAVE ONE COMMENT ABOVE EACH ONE TO DESCIBE THE PURPOSE OF THE FUNCTION
C++
ALL FUNCTION HEADERS MUST HAVE ONE COMMENT ABOVE EACH ONE TO DESCIBE THE PURPOSE OF THE FUNCTION.
Functions must be used in all programs -> Prototypes above main ( ), function definitions after main ( )
NO GLOBAL VARIABLES ALLOWED (except for constants)!!!
A local car dealership would like to hire you to writes a C++ program that stores the most relevant information for new daily vehicle acquisitions in a report. As new and used vehicles are delivered daily to the dealership lot, the user must enter the Type of Vehicle (car, truck, or SUV), the most common exterior specifications such as the make, the model, and color. The user is also required to enter the most common interior features such as the number of seats available, the interior color, and how many doors the vehicle has so that the salespeople know what newly acquired vehicles are available since they have not been entered into their database yet.
1. Specify a structure named Exterior to store the exterior specs of make, model, and color. You will use this structure as the data type for the required Exterior in the Vehicles structure.
Suggestion: struct Exterior { string make; string model; string color; };
2. Specify a structure named Interior to store the interior features of seating, color, and doors. You will use this structure as the data type for the required Interior in the Vehicles structure. (
Suggestion: struct Interior { int seating; string color; int doors; };
3. Specify a structure named Vehicles to store the following data for each new vehicle:
a. Type of Vehicle (car, truck, or SUV)
b. Exterior Specifications
c. Interior Features
Suggestion: struct VEHICLES { string vehicle_type; Exterior specs; Interior features;
4. Specify a one-dimensional array to store the vehicle records. Set the maximum number of vehicles records to 50 (there has never been more than 25 vehicles delivered in one day), but let the user specify how many student records need to be entered.
5. Use main( ) as your driver function. The program does not need to be repeatable. Writes appropriate functions that main( ) calls to accomplish the following tasks: • Read the number of vehicles delivered. • Read and store the name and required specifications for each vehicle. • Display each vehicles type, exterior specifications, and interior features.
Sample Input:
Enter the number of vehicles: 3
Enter the information for vehicle #1.
Type (Car, Truck, SUV): Car
Exterior Specification:
Make: Ford
Model: Mustang
Color: Yellow
Interior Specifications:
Seating: 5
Color: Black
Doors: 2
Enter the information for vehicle #2.
Type (Car, Truck, SUV): Truck
Exterior Specification:
Make: Chevrolet
Model: Silverado
Color: Black
Interior Specifications:
Seating: 5
Color: Tan
Doors: 2
Enter the information for vehicle #3.
Type (Car, Truck, SUV): SUV
Exterior Specification:
Make: GMC
Model: Yukon XL
Color: White
Interior Specifications:
Seating: 8
Color: Dark Grey
Doors: 4
Sample Output:
The Vehicle report is:
1. Car
Exterior Specification:
Make: Ford
Model: Mustang
Color: Yellow
Interior Specifications:
Seating: 5
Color: Black
Doors: 2
2. Truck
Exterior Specification:
Make: Chevrolet
Model: Silverado
Color: Black
Interior Specifications:
Seating: 5
Color: Tan
Doors: 2
3. SUV
Exterior Specification:
Make: GMC
Model: Yukon XL
Color: White
Interior Specifications:
Seating: 8
Color: Dark Grey
Doors: 4