Description
The RentalCar struct will contain the following data members:
–Â make, a C-style string
–Â model, a C-style string
–Â year, an int
–Â price, a float (price per day)
–Â available, a bool (1 = true; 0 = false; try to display true/false using the “boolalpha” flag, optional)
The menu must have the following functionality:
– Read ALL data from file.
–Â Print out ALLÂ data for all of the cars.
– Estimate car rental cost – prompt the user for a car number (first car in file should be
represented to the user as #1), and the number of days to rent the car.
– Find the most expensive car.
– Print out ONLY the available cars.
– Exit program.
The following minimum functionality and structure is required:
– Ask the user for the input file name.
– The list of cars must be stored in an array of structs.
– Use character arrays (i.e., C-style) to hold your strings. No string data type!
– Write multiple functions (Hint: each menu option should be a function).
– You can use pass by reference in your function.
– Write your own string copy, string compare (or other) functions as needed.
– The other functionality and structure of the program should remain the same as Project #1, including writing to screen and file and restrictions on string libraries, global variables and constants, etc.