Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

Students also viewed these Databases questions