Name. SS#. Stapled. Numbered. Ordered. Printed (double space).
Due Date: Class Thursday, July 22nd
1) I gave the source code for project I. It assumed that you had unlimmited number of each type of coins (quarters, dimes, nickels and pennies). Now, lets assume a different situation: the number of coins of each type is limmited (i.e. you have only a certain amount of quarters, a certain amount of dimes and a certain amount of nickels and pennies). For example, lets say that you have only 9 quarters; so, you can only give out 9 quarters as change; the rest of the change has to be in dimes, nickels and pennies. If you run out of coins to give change, you should print: "Sorry! I am out of changes now!". CHANGE THE CODE FOR PROJECT I TO REFLECT THIS NEW ASSUMPTION. THE FIRST LINE OF INPUT WILL READ THE NUMBER OF COINS OF EACH TYPE (QUARTERS, DIMES, NICKELS AND PENNIES - IN THAT ORDER). An example of input file would be:
30 24 55 67
5.87
2.75
1.20
6.98
This means that you have ONLY 30 quarters, 24 dimes and 55 nickels and
67 pennies to give out as change. And that you have to give $5.85, $2.75,
$1.20 and $6.98 in change. So, you will have to keep track of your coins...
If you run out of coins, you have to print the message above.
2) I have emphasized in class that the very first thing you have to do is to THINK about the problem you have to solve. We disscussed some techniques (top-down design, for example) to help you come up with the algorithm. We have also talked about some tools (like pseudo-code - The appendix in the Lectures Notes has a very interesting suggestion of one). Project II is now posted. I want you to turn in your SOLUTION to that problem. (ATTENTION: I am NOT asking for the code here!!!! The code is to be submmitted via the Grader as specified!!). You can choose the technique/tool you feel most confortable with. I would like, also, a VERY SHORT comment of your personal experience (why you chose such method, what you think of it, advantages/disadvantages, suggestions for improvements, etc.).