Question: CPS 1 2 3 1 SI Session: Exercise 3 Selections ( Ch 3 ) 3 . A shipping company uses the following table to calculate

CPS 1231 SI Session: Exercise 3
Selections (Ch3)
3. A shipping company uses the following table to calculate the cost (in dollars) of shipping based on the
weight of the package (in pounds).
Standard shipping (=0) Expedite shipping (=1)
0< weight <=3 $3.000< weight <=3 $6.00
3< weight <=10 $5.003< weight <=10 $10.00
weight >10 Cannot ship weight >10 weight * $2.00
--Sample Run--
3-1. Draw a flowchart for your program? (2 point)
3-2. What type of invalid inputs are possible? (1 point)
3-3. Name you class (program) SISession3 and show your running code. (2 point)
(Extra) Handle all invalid inputs mentioned in 3-2.
(Extra) Convert your code (or portion of code) to a switch statement if you used if-else statements
or vice-versa

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 Databases Questions!