This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
A parking garage charge a RM2 minimum fee to park for up to three hours.The garage charges and additional Rm0.50 per hour for each hour or part thereof in excess three hours.The maximum charge for any given 24-hour perid is Rm100.Assume that no car for longer than 24 hours a time.Write the java Program that calculates and displays the parking charges for each customer who parked in the garage yesterday.You should enter for the current customers and shpuld calculate and display the running total of yesterday receipts.The progrom should use the method calculate Charge to determine the charge for each customer.Plan your solution by providing the flowchart and algorithm to solve this problem.
please... i still do khow how to solve....just learn a few week only....thank you ...
Assuming this is an assignment you will have to think on these lines.
A database to store the parking records (i.e. customer, parking period, parking rates etc.). You could use the jdk bundled Derby database (JSE 1.6 should have it) (I guess you could also forget about Databases and keep the data in data structures for the life time of the application)
Some sort of User Interface (command line? Swing (i.e. window like UI)? Web application [may require servlet/jsp + servlet container]?) Command line, Swing app, Web app should be in increasing order of difficulty.
Java Business components (i.e. Java classes) (accept and save records in DB, calculate fees, generate report ) + Other logic (connect to DB, UI Event logic etc )
You need to learn Java and associated technologies. One resource is the java tutorial. Go through covering the basics trail. Then JDBC under specialised trails.
May be that cattle drive or something here in Javaranch may be suited to you to gather the skills needed to handle this project.