Question: Write a program in Java that asks user to enter: the shipping type, the weight of a package, and the number of miles shipped. The
Write a program in Java that asks user to enter: the shipping type, the weight of a package, and the number of miles shipped. The program will then calculate and display thThe Fast Freight Shipping Company provides three types of package shipping:
Ocean Freight Shipping: base charge $ for the first pounds
Air Flight Shipping: base charge $ for the first pounds
Ground Shipping: no base charge
For the rest pounds over pounds, the company charges the following rate:
Weight of Package Shipping Rate Per miles Per pounds
pounds or less $
Over pound but no more than pounds $
Over pound but no more than pounds $
Over Pounds $
Notes:
The shipping rate per miles per pounds are not prorated.
If the user chooses ground shipping, there is no base charge. The weight column in the shipping rate table should be the entire package weight.
If the user chooses ocean freight or air flight, there is a base charge for the first pounds. The weight column in the shipping rate table should be the package weight pounds.
For packages less than pounds and shipped by ocean freight or air flight, the total shipping charge is the base charge no matter how many miles shipped.
For example,
if a pound package is shipped miles by ocean freight, the shipping charges will be
If a pound package is shipped miles by air flight, the shipping charges will be
if a pound package shipping miles by ground shipping, the shipping charges will be e shipping charges for the package.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
