Beligerent Unicycles makes top quality unicycles, with a difference. They cost more, but you get respect!
They have three models. The FlameOut 5000 carries a napalm thrower. The Ratatat Special has a 0.30 cal machine gun. The Target 20 has no weapons.
Here are the parts required to make each model:
Model | Parts list |
FlameOut | One frame, one steel wheel, one napalm thrower |
Ratatat | One frame, one rubber wheel, one 0.30 cal MG |
Target | One frame, one rubber wheel |
Here are parts costs:
Part | Unit cost |
Frame | $128.66 |
Rubber wheel | $52.76 |
Steel wheel | $228.55 |
Napalm thrower | $1459 |
0.30 cal MG | $2048 |
Write a program that will compute the parts cost for an order. The worksheet starts like this:
Users enter values for each unicycle model, and click Run. Your program checks that each value is numeric, and between 0 and 50 inclusive. If not, it shows an error message. For example:
If the data is OK, the program computes and shows parts cost:
Use the IPO pattern, with at least one sub for each. The usual coding standards apply.
Upload your solution.
(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)