Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The parking fee on our lot is $3.00 for the first hour. Then, an additional $1.00 per hour is charged for each hour or part
The parking fee on our lot is $3.00 for the first hour. Then, an additional $1.00 per hour is charged for each hour or part thereof over an hour. The maximum charge for any given 24-hour period, or for lost ticket is $12.00. Assume that no car parks for longer than 24 hours at a time. Write a program that will help the cashier calculate and print the parking charges for each customer who parked their cars in this lot. Your program will prompt the cashier to enter the number of cars / customer(s) then prompts the cashier to enter the number of hours each car / customer was parked. Your program should print the result in a tabular format. Also, it should at the end calculate and print the number of customer(s) and the total amount all the customers paid, if there were more than one. The program should use the function calculateParkingFee to determine the charge for each customer. Your outputs should appear in the following format: Your menu might be similar to this. However, yours must use sub-menus. Ex. If you complete both of the guessing game Problem Statements 4 and 5, when the user selects 5 that in turn should display a menu asking the user whether they want to play heads / tails or too high / too low. There should be a third option allowing the user to return to the main menu. I would expect the first 4 items on the menu to be displayed as a sub-menu under Arithmetic. When the user selects the option for Arithmetic from the main menu, that option would then display another menu with the 4 options for addition, subtraction, multiplication and division. There should be a fifth option allowing the user to return to the main menu. Remember to allow the user to select an option to exit from your sub-menus back to the main menu
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started