Thursday, January 12, 2012

Lab 2: ATM

For this lab you will implement a program that would run inside an ATM machine and determines what bills to give the person. This machine, however, is from the future and is able to dispense $1, $5, $10, $20, and $50 bills. Your program will ask the user how much money he wants to withdraw and then print out the minimum set of bills required to produce this amount.

For example:

Enter the withdrawal amount:77
You will get:
1 fifty dollar bills
1 twenty dollar bills
0 ten dollar bills
1 five dollar bills
2 one dollar bills

For this and all future programs, the top of your .java file should have the name and email of both of you (pair programming), and the name of the file, as such:

/**
 * Main.Java
 * @author Jose M Vidal <jmvidal@gmail.com>
 * @author Jane Bigbrain <bigbrain@email.sc.edu>
 * Created On Jan. 12, 2012
 * 
 */

As always, you will turn in your lab at dropbox.cse.sc.edu, under Lab 2 this time.

No comments: