Question: Develop a flowchart and then write a menu-driven C++ program, using control constructs and user-defined functions, to solve the following problem. (Note: declare the parking

Develop a flowchart and then write a menu-driven C++ program, using control constructs and user-defined functions, to solve the following problem. (Note: declare the parking fee schedule as const variables. Never use the bare bone constant values shown).

The sign on the attendant's booth at the UH parking lot is:

UH Visitors Parking

Cars: First 1 hour: Free

Next 2 hours: $ 3.00 per hour

Thereafter: $ 1.50 per hour (more than 3 hours)

Motorcycles: First 1 hour: $ 2.00

Next 5 hours: $ 1.50 per hour

Thereafter: $ 1.00 per hour (more than 6 hours)

Senior Citizens: Free

Upon execution of the program, the screen will be cleared and the following menu will appear at the top of the screen, properly centered:

Help Cars Motorcycles Senior Citizens Quit

H or h (for Help) option will briefly explain how the program should be used. Display of the parking fees shown above along with explanatory notes will help here. Once the user finishes reading the help screen(s), striking any key (strike a key followed by Enter key) will clear the screen and the menu is displayed again.

C or c (for Cars) option will prompt the user for the number of minutes a vehicle has been in the lot. The program should then compute the appropriate charge and display the ticket on the monitor for the customer. Any part of an hour is to be counted as a full hour (e.g., 65 minutes will be two hours.) Once the user finishes viewing the ticket, striking any key will clear the screen and the above menu is displayed again.

M or m (for Motorcycles) option will prompt the user for the number of minutes a vehicle has been in the lot. The program should then compute the appropriate charge and display the ticket on the monitor for the customer. Any part of an hour is to be counted as a full hour (e.g., 45 minutes will be one hour.) Once the user finishes viewing the ticket, striking any key will clear the screen and the menu is displayed again.

S or s (for Senior Citizens) option will prompt the user for the number of minutes a vehicle has been in the lot. The program performs no computations. The ticket should show $0.00. Once the user finishes viewing the ticket, striking any key will clear the screen and the menu is displayed again.

Q or q (for Quit) option will clear the screen and returns the control to the programmer's IDE.

Test your program with the values shown below.

for option C, c : 0, 50, 85, 125, 145, and 360 minutes

for option M, m : 0, 54, 60, 121, 155, and 175 minutes

for option S, c : 0, 200, and 380 minutes

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!