# Thread: a parking garage program

1. Member
Join Date
Oct 2011
Posts
24
Rep Power
0

## a parking garage program

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 calculateCharges to determine the charge for each customer.
guys I couldn't find the algorithm some one can help me

2. ## Re: a parking garage program

That looks like high school algebra with a few if statements for the extra charges.
Take each sentence and write the equation for the computation.

3. Member
Join Date
Oct 2011
Posts
24
Rep Power
0

## Re: a parking garage program

can you explain more clear I dont understand

4. ## Re: a parking garage program

You need to read your assignment and figure out the equations needed to compute the values that are required to do the program.

Take a piece of paper and write down the customer's charges.
Use many different values for the hours that the customer parked.
For example:
what are the charges for 2 hours?
What are the charges for 5 hours?
What are the charges for 15 hours?
Last edited by Norm; 12-24-2011 at 03:08 PM.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•