Question: Assignment 4 Case Study : We are going to take requirements from assignment three and highlight the requirements that can now use control structures. We

Assignment 4

Case Study :

We are going to take requirements from assignment three and highlight the requirements that can now use control structures. We have simplified our requirements up to this point because we did not have the availability of control structures like we have now. In addition to the original requirements, we will also add a requirement to create a program that will loop to create orders from several customers.

.The region cost (North, South, East 5 dollars, West 3 dollars) should be added to cost based on the delivery region. Program should ask for region by letter code. N - North, S-South, W-West and E-East. The default region is West. (Use a decision structure for this requirement)

.The program at this point only needs to prompt for multiple customers. Each order will need to prompt for number of skate boards, region and weight. When the text QUIT (note: upper case letters) inputted, that flag value is a signal that input is over.

Exercise:

Modify the original pseudo code and from the new pseudocode create flowchart so that it includes the decision and repetition structures recommended above.

Original pseudo code from assignment 3 that you are going to modify is bellow:

Assignment 3 pseudocode:

Start

OUT Enter the number of skateboards: ;

GET skates;

OUT Enter the region for your shipment: ;

GET region;

OUT Enter the total weight of the shipment: ;

GET weight;

Int totalcost= (2*skates)+(0.75*weight);

If region=West

{

Shippingcost=totalcost+3;

}

Else

Shippingcost=totalcost+5;

OUT The total shipping cost for the shipment is + shippingcost + dollars.;

Stop

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!