I currently having trouble in writing a programe. Heres the topic for the programe:
Write an applet ParkFees.java that calculates the fees for parking a car. The programe should prompt for the type of vehicle (either a car or truck). It will charge the driver $2 for 1st hour, $1.80 for the 2nd hour, and $1.20 per hour for the rest. If the vehicle is a truck, an additional of $1 is charged to the total.
Your programe should call a method calFee(). The method calFee() will take in the toatl number of hours parked,and a variable indicating whether the vehicle is a car or truck.
Include a textfield for "Enter (c)ar or (t)ruck." Include a textfield for "Enter hours parked." Include a button "Calculate Parking Fees." Include the final calculation "Your parking fees is ???" below.
Can anyone please help me? And will it be possible to E-mail the text programe to me? Thankz!
Hello Jack.. Iam giving you some suggestion in your designing the whole project.Your project ss related to car parking ok Look whenever car comes for parking you must have a registration no of that. first make user interface that should contain following field 1)Vehicle Reg no 2)Option car or truck I think these two information is enough. Now whenever a vehicle comes you pick these two information .Your programe should be able to calculate date and time as well.Put all these information into data base.Your programe should also be able to calculate money with respect of the time of vehicle that has been parked. Now When vehicle leaves the parking place ,you just query to data base for this vehicle according to his reg no.Your programe will pick all information that you fed plus present time and also calculate money according to time difference.After that if you want you can delete that record. I think this would be the correct logic for your project. If you need any help in your coding, dont hesitate to ask me at yousuf@security-park.com