Question: ATM.java Requirements: An ATM manufacturer would like a program that allows the user to enter the amount of cash in whole dollars and then displays
ATM.java
Requirements: An ATM manufacturer would like a program that allows the user to enter the amount of cash in whole dollars and then displays the number bills by denomination ($20, $10, $5, and $1 bills) be dispensed if the limit of $500 is not exceeded. Your program should calculate the maximum number of twenties in the amount entered, followed by the maximum number to tens in whats left after the value of the twenties has been removed, and so on. For example, if 36 is entered as the amount, you would have one of each denomination as shown in Example #2 below.
Design: The ATM manufacturer would like the output to look as shown below when 501 is entered as the amount, when 36 is entered, and when 432 is entered three separate runs.
Example #1 Line number Program output 1 2 3 ----jGRASP exec: java ATM Enter the amount: 501 Limit of $500 exceeded! ----jGRASP: operation complete.
Example #2 Line number Program output 1 2 3 4 5 6 7 8 ----jGRASP exec: java ATM Enter the amount: 36 Bills by denomination: $20: 1 $10: 1 $5: 1 $1: 1 $36 = (1 * $20) + (1 * $10) + (1 * $5) + (1 * $1) ----jGRASP: operation complete.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
