Question: You will learn how to use conditional statements in C + + ( if - else ) to determine the rate of shipping charges and

You will learn how to use conditional statements in C++(if-else) to determine the rate of shipping charges and compute the amount charged. This problem is taken from P.225 #15 of the text:
==========================
[Shipping Charges]
The Fast Freight Shipping Company charges the following rates:
Weight of Package (in Kilograms) Rate per 500 Miles Shipped
2 kg or less $1.10
Over 2 kg but not more than 6 kg $2.20
Over 6 kg but not more than 10 kg $3.70
Over 10 kg but not more than 20 kg $4.80
Write a program that asks for the weight of the package and the distance it is to be shipped, 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 than 20 kg (this is the maximum weight the company will ship). Do not accept distances of less than 10 miles or more than 3,000 miles. These are the companys minimum and maximum shipping distances.
====================================================
Reminder: Make sure you include documentation in your program including your name, date, and the purpose of the program. After you test the program to be correct, submit by uploading the source file (the .cpp file.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!