Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
parking garage help Posted by ryclegman on 20 Feb 2012 at 8:32 AM
Yes, this is an assignment and would like some input or advice before i proceed to do this. I will be using an array set up for this correct? And if there are any more points you guys could provide me with that would be great! Thanks for reading this and spending your time helping me! I really appreciate it!


A parking garage has 10 customers daily. The garage charges a $2.00 minimum fee to park up to two hours. The garage charges an addition 50 cents per hour for each hour (or part of an hour) over two hours. The maximum charge for any given 24-hour period is $8.00. All cars are gone by midnight. Write a program to calculate and print a summary of the charges for a day. For input the program will read the hours of usage for each of the 10 cars. The program will print the results in the form of a table in a neat format, as shown below.

Enter the hours parked for car 1: 1.5
Enter the hours parked for car 2: 4.1
Enter the hours parked for car 3: 2.0
.
.
.
Enter the hours parked for car 10: 0.5

Total Hours 24.6
Total Charge 43.50




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.