Question: A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each

 A parking garage charges a $2.00 minimum fee to park for
up to three hours. The garage charges an additional $0.50 per hour
for each hour or part thereof in excess of three hours. The

A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write an application that calculates and displays the parking charges for each customer who parked in the garage yesterday. You should enter the hours parked for each customer The program should display the charge for the current customer and should calculate and display the running total of yesterday's receipts. The program should use the method calculatechargesto determine the charge for each customer Enter number of hours (a negative to quit): 2 Current charge: $2.00 Total receipts: $2.00 Enter number of hours (a negative to quit): 10 Current charge: $5.50 Total receipts: $7.50 Enter number of hours (a negative to quit): -1 1. The calculatecharges method should take one argument and return a double 2. To calculate the fee in line 24, call method calculatecharges) and pass it the number of hours input by the user. Assign the returned value to variable fee. 3. Be sure to follow the spacing and indentation conventions mentioned in the text. The starter code is given on the next two pages. Remember that each public class should be in a separate file. Submit a zipped file into Lab 10 Canvas Drop Box that contains: Your Java source code and the corresponding output test results. (Do not include . c lass files!)

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!