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