Results 1 to 4 of 4
  1. #1
    jihad is offline Member
    Join Date
    Oct 2011
    Posts
    24
    Rep Power
    0

    Default 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. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,874
    Rep Power
    25

    Default 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. #3
    jihad is offline Member
    Join Date
    Oct 2011
    Posts
    24
    Rep Power
    0

    Default Re: a parking garage program

    can you explain more clear I dont understand

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,874
    Rep Power
    25

    Default 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.

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2011, 01:57 PM
  2. Replies: 13
    Last Post: 03-22-2011, 07:49 AM
  3. changing my program to array working program
    By Chewart in forum New To Java
    Replies: 39
    Last Post: 11-18-2009, 07:53 PM
  4. Replies: 0
    Last Post: 04-04-2008, 03:40 PM
  5. Replies: 0
    Last Post: 10-04-2007, 10:33 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
  •