Question: Please use Java, Thank you.3-3 Write a program that converts change into formatted dollars and cents It should do the following: 1. Prompt the user

Write a program that converts change into formatted dollars and cents It should do the following: 1. Prompt the user for their change in Quarters, Dimes, Nickels, and Pennies 2. Read the associated integers from the keyboard 3. Calculate the result 4. Use printf to display the output as $ d.cc A sample run with inputs 6, 5, 4, 3 must look like: (plural is ok even when grammatically incorrect) Enter the number of quarters: Enter the number of dimes: Enter the number of nickels: Enter the number of pennies: You entered: 6 quarters 5 dimes 4 nickels 3 pennies The total in dollars is $2.23 A sample run with inputs 1,2,3,2 must look like: Enter the number of quarters: 1 Enter the number of dimes: 2 Enter the number of nickels: 3 Enter the number of pennies: 2 You entered: 1 quarters 2 dimes 3 nickels 2 pennies The total in dollars is $0.62 Hint: Use printf to ensure there is at least 1 digit to the left of the decimal point and at most 2 digits to the right. Please make sure to end each line of output with a newline. Please note that your class should be named ChangeConverter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
