The Artima Developer Community
Sponsored Link

Java Answers Forum
Help to design...

1 reply on 1 page. Most recent reply: Mar 14, 2002 9:59 AM by Ray

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Zack Tan

Posts: 2
Nickname: piass
Registered: Mar, 2002

Help to design... Posted: Mar 11, 2002 5:01 AM
Reply to this message Reply
Advertisement
Hi there,

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!

From:
Zack (zornitier@yahoo.com)


Ray

Posts: 2
Nickname: ray
Registered: Mar, 2002

Re: Help to design... Posted: Mar 14, 2002 9:59 AM
Reply to this message Reply
maybe you should do your own schoolwork...

Flat View: This topic has 1 reply on 1 page
Topic: How to call JSP from java code? Previous Topic   Next Topic Topic: My browser doesn?t support Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use