Question: Your task is to develop software for a machine which dispenses change. It accepts an amount in cents and outputs the ways that amount can

Your task is to develop software for a machine which dispenses change. It accepts an amount in cents and outputs the ways that amount can be made up from 1, 5 and 20 cent coins (ignoring the fact that we no longer have 1 cent coins) using as many of the larger valued coins as possible.

Open the file TellerMachine.java and write code to solve the specifications above.

Here is how your program should behave (user input is in bold): Enter an amount of cents in the range 0 to 100: 77 Dispensing... 3 20c coin(s) 3 5c coin(s) 2 1c coin(s)

Hint: 77 % 20 has a value of 17 and 77 / 20 has a value of 3.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!