Common Computer Science References
At the end of this lesson, you will be able to:
create an application that uses decision statements
decisions in code
including error checking with try ... catch
read "Structured Problem Solving", Chapter 2, Computer Based Problem Solving
read up to and including "Selection"
read the following problem:
A small microwave is being built just to reheat lunch items. The user selects the item and the number of them that they placed in the microwave (max 3 and they must all be the same items). The engineers have figured out the correct time to heat 1 of each item. It is also known that if you have 2 of them, you should increase the time by 50% and if you have 3 of them you increase it by 100%. Use the following items and times:
1 x sub = 1 minute
1 x pizza = 45 seconds
1 x soup = 1 minute 45 seconds
you must include error checking from now on!
no crashing programs no matter the input!
do the above in a second language