Need Assisatnce PLease

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Outlaw
    New Member
    • Jun 2007
    • 2

    Need Assisatnce PLease

    The Fast Freight Shipping Company charges the rates listed in the following table:

    Weight of the Package (in kilograms) / Shipping rate per Mile
    2kg or less / $0.01
    over 2kg, but not more than 6kg /$0.015
    over 6kg, but not more than 10kg /$0.02
    over 10kg, but not more than 20kg / $0.025

    Create an application that allows the user to enter the weight of the package and the distance it is to be shipped, and then displays the charges.

    Input validation: Do not accept values of 0 or less for the weight of the package. Do not accept weights of more thann 20 kg(this is the maximum weight the company will ship) Do not accept distances of less than 10 miles or more than 3000 miles. These are the company's minimum and maximum shipping distances. Use exception handling to check for non-numeric data.
    Use the following test data to determine if the application is calculating properly.
    weight and disatnce Shipping Cost
    1.5kg,100Miles $1.00
    5kg,200Miles $3.00
    8kg,750Miles $15.00
    15kg,2000Miles 50.00

    Have the top code except can not figure out the calculator. Need Major Help
  • ansumansahu
    New Member
    • Mar 2007
    • 149

    #2
    Originally posted by Outlaw
    The Fast Freight Shipping Company charges the rates listed in the following table:

    Weight of the Package (in kilograms) / Shipping rate per Mile
    2kg or less / $0.01
    over 2kg, but not more than 6kg /$0.015
    over 6kg, but not more than 10kg /$0.02
    over 10kg, but not more than 20kg / $0.025

    Create an application that allows the user to enter the weight of the package and the distance it is to be shipped, and then displays the charges.

    Input validation: Do not accept values of 0 or less for the weight of the package. Do not accept weights of more thann 20 kg(this is the maximum weight the company will ship) Do not accept distances of less than 10 miles or more than 3000 miles. These are the company's minimum and maximum shipping distances. Use exception handling to check for non-numeric data.
    Use the following test data to determine if the application is calculating properly.
    weight and disatnce Shipping Cost
    1.5kg,100Miles $1.00
    5kg,200Miles $3.00
    8kg,750Miles $15.00
    15kg,2000Miles 50.00

    Have the top code except can not figure out the calculator. Need Major Help
    Hi ,

    You declare two variables that hold the actual weight of the package and the actual distance that it needs to cover. Now based on calculation chart in bolcks calculate the cost. For e.g. when the first 1.5 kg an dthe 100 miles is calculated hold the calculated cost in a separate variable and deduct the 1.5kg from the actual weight and 100 miles from the actual distance. Then pick the next chunk and repeat the procedure. This way you should be able to calculate the cost.

    Think over this and you will be able to do it.

    good luck
    -ansuman sahu

    Comment

    • Outlaw
      New Member
      • Jun 2007
      • 2

      #3
      Thank-you But I am Very new too this Stuff.

      Outlaw

      Comment

      Working...