# I have a problem with an "ATM" machine programming...

• 07-21-2011, 07:55 PM
Tommeke
I have a problem with an "ATM" machine programming...
we want to model an ATM. the ATM give note of 10, 20 and 50 euro.
taking into account following logic...:
the withdrawed amount is always composed of the maximum number of highest notes. en the maximum number notes of the next value.
Example: the requested amount = 90
this gives 1 note of 50 , 2 notes of 20
(NOT 4 of 20 and 1 of 10)
the returned amount is at least equal to the requested value. so the ATM rounds up.
example if requested is 75 then you get 80 back (1x50, 1x20 and 1x10) 1 van 10€), if U ask 96 u get 100 (2 x50 )
each type of note should be a different class
the returned amount should also be a sepperate class.

Can someone help me with this, because, I'm getting desperate about how to solve this!

thnx

T
• 07-21-2011, 08:00 PM
KevinWorkman
The same things I told you in your other post apply here as well.
• 07-21-2011, 08:04 PM
Fubarable
Thread locked as a homework dump (no work shown) and a duplication of a previous question.