Question: task 5 java lang 2:15 d. Back Wo2 Lab Advanced objects.docx T max new EO: 4.5. Why does maximum use compare To instead of -
2:15 d. Back Wo2 Lab Advanced objects.docx T max new EO: 4.5. Why does maximum use compare To instead of - (Hint: why can't you use -- with object reference variables? Task 5. Loop, input, and variable review: objects not required. (15 points) Write a Java program that can make change for a vending machine. Your program should take two numbers as input, one for the amount charged and one for the money given. You can assume both amounts are less than $10, and that the user will give more money than the amount due Use the following U.S.coins dollar, quarter, dime, nickel penny. The program displays the number of each kind of coin to give back. Try to design your program so that it returns the fewest number of coins possible. Output of a sample program run: You bought something worth $1.25. You paid $2.10. Your change is: 0 dollar coins 3 quarters 1 dimes O nickels Opennies Rubric: Student name and today's date are a comment on the first line of the program (-5 if fails) Dollar coins used to calculate change (-10 if fails) Input two numbers: 2 points . Change due calculation: 1 point Correct change: 5 points Minimum coins correct change: 5 points Overall program operation: 2 points Please paste a screenshot of a successful program run, and copy and paste the source code from your java file, here: CIS 143 - Winter 2021 Lab 2 Page 1 of 5 Dashboard Calendar To-do Notifications
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
