Question: Write a procedure called mass_production_order() that receives as input, 2 parameters, price and number . The first represents an item's production cost price and the

Write a procedure called mass_production_order() that receives as input, 2 parameters, price and number. The first represents an item's production cost price and the second the number of items ordered on a single order.

The procedure should calculate and print the total cost price for the complete order. However, as it is mass-produced the following calculation rules apply:

  • For the first 40 items ordered the items production cost is the basic cost per item.
  • For each item over 40 hours made and up to 50 items made, the item costs 20% less than the basic cost per item.
  • For each item above 50 hours made, the item costs 40% less than the basic cost per item.
  • Orders above 80 items are not be allowed and an error message should display (as per the given example)
  • The answer of every calculation should be rounded to 2 decimal places.

The text for the prints is available in the test cases. Do not call the procedure, it will be called by the test program.

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!