Question: 7.9 Ch 4. Online Shipping Calculator (Java) Purpose: Compute the cost of shipping for an online store. Procedures: The user enters the weight of the
7.9 Ch 4. Online Shipping Calculator (Java) Purpose: Compute the cost of shipping for an online store. Procedures: The user enters the weight of the item to be shipped and the shipping destination. The application computes the total shipping cost. Algorithms, Processing and Conditions: A user enters the weight in pounds and selects the destination for the delivery. The user can select U.S. standard delivery by entering 'U' or international delivery by entering an 'L' for Latin America or 'C' for Canada. If the item weighs less than 5 pounds the standard rates apply. If the item weighs more than 5 pounds, add a 25% surcharge to the standard rates. The shipping rates are $6.00 for the U.S., $8.00 for Latin America or Canada. If the customer requests overnight shipping, double the shipping cost. The total cost for shipping is displayed. Notes and Restrictions: If the user enters a negative weight, inform the user and ask for a valid weight. If the value entered is greater than 20 pounds, the user should be advised and asked for a valid weight. The shipping cost should be displayed in currency format.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
