Due Date Tuesday, February 24, 2004
Your task is to write a program to make change for less than one dollar using the minimum number of coins. The main method should only contain method calls. Sample screen output is shown below. You should line up your numbers under the appropriate headings as shown.
| Screen Output: | ||||
| Please enter an amount in cents less than $1.00 for which you would like change. | ||||
| User Input: 67 | ||||
|
Screen Output: |
||||
| Quarters | Dimes | Nickels | Pennies | |
| 2 | 1 | 1 | 2 | |
Note: Do not output 0 coins!
You may use the ReadLib class for your input and command line output or you may use the swing classes. It's your choice.
Documentation
/3
- make sure your initial comments are on each class
- each method should be commented as to purpose
Construction
of
Methods
/5
- separate method for calculation
- separate method for output
- separate method for input
- main method contains only method calls
- parameters pass correctly among methods
Use
of If
Statements
/5
Correct Output of Test Case /2
Total /15
Use Blackboard to submit your program
** Make sure that your .jpx file and the .java file are in the same folder!