Question: Please adhere to the Programming Standards and the Java Coding Guidelines. Submit the following: List of source code with comments to document Test output listed

Please adhere to the Programming Standards and the Java Coding Guidelines. Submit the following: List of source code with comments to document Test output listed as comments at the end of your program ChangeMaker.(10 pts). Write an application called Change Maker, that prompts the user for an integer value between 1 and 99, representing the change (in cents) to be dispensed from a vending machine. Use the Scanner class to read in the value. Then display the equivalent amount of change as the number of quarters, dimes, nickels, and pennies. In other words, ChangeMaker should dispense the smallest number of coins. Developing pseudocode for this assignment will help you sort out the calculations. (see hint below) Please test your code with the following 4 cases and provide output of each case. Example Output: Welcome to Change Maker. I will find a combination of coins that equals that amount of change you should receive. Change in cents 88 51 Please enter an amount from 1 to 99: 92 92 cents in coins can be given as: 3 quarters 1 dimes 1 nickels and 2 pennies Case 1 Case 2 Case 3 Case 4 Hint: Integer Division and the Modulus Operator Starting out with a value in cents (from the user), the task is to convert that number into the smallest number of coins - quarters, dimes, nickels and pennies. If we use the example above of 92 cents, the first step is to determine how many quarters can be given. Use integer division. The number of quarters = total Cents / 25. This will return a whole number representing quarters. 3 quarters to be exact. Now, how do you determine how many cents remaining? Remember, the remainder can be found by using the modulus operator (%). This will be the remaining cents. So in the example, the remaining cents = total Cents % 25 which is 17 cents. Now, go through the same mechanics for dimes. Divide the remaining 17 cents to get the number of dimes. Again, use modulus for the remainder of cents. Then divide the remaining cents to get the number of nickels. Use modulus for the remainder of cents. This remainder is the number of pennies. It can be very helpful to try these calculations by hand to verify
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
