Question 1 - Shipping Fee Calculator (may be evaluated for RLOs 1.2, 3.1, and
5.1)
Develop a shipping fee calculator for a courier. The shipping cost is determined by the
weight or the dimensions of a parcel, as well as the estimated delivery time. The specific
rules are listed in the table below:
Cost by Package Weight
Cost by Package Dimensions
By Air (1-3 business days) By Land (4-6 business days)
$30 per lb
$20 per cubic feet
$15 per lb
$10 per cubic feet
? A Parcel is charged based on either its weight or its dimensions, whichever cost is
greater.
Develop an algorithm (8 to 18 lines) and then code a program that asks the user to input
the desired delivery time (in days), package weight (in lbs), and package dimensions
(length, width, and height in inches). Your outputs should contain the recommended
delivery method (by air or by land), and the corresponding shipping cost.
Test your program once with the following information:
- Desired delivery time: 2 business days
- Package weight: 3 lbs