Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Change Assignment: Please note, the assignment is referring to the IO class subsquentially as the following: - IO.outputIntAnswer(), IO.outputDoubleAnswer() - equivalent to System.out.println() - int
Change Assignment:
Please note, the assignment is referring to the IO class subsquentially as the following:
- IO.outputIntAnswer(), IO.outputDoubleAnswer() - equivalent to System.out.println()
- int test = IO.readInt(), double test = IO.readDouble() - equivalent to Scanner class
Change Write your code in the file Change.java Use the IO module to output answers. You have to develop a method that computes which bills and coins will be given as change for a sales transaction. Your method has to have the following signature. You may write your own main method to test your code. Autolab wil ignore your main method public static void change (double sale Total, double customerPayment)0 The output is how many bills and coins of each of the available will be used. The change should have the minimum number of bills and coins possible. The available bills are 5130 $55 $25 51 The available coins are 75 cents 30 cents I cent Example: thale total price is $13.25 and the customer pays with a $25 bill, the change of $1175 wll be given using two $5 bills, one SI bill and one coin of 75 cents. RESULT: 0 RESULT: 0 RESULT: 0 RESULT: 2 RESULT: 1 RESULT: 1 RESULT: 0 RESULT: 0 s130 bill) ( 55 bill) (0 $25 bill) (2 s5 bil1) (1 $1 bi11) (1 $0.75 coin) (0 s0.30 coin) (O $0.01 coin) Your output should be always be in the same order. On error, report bad input, output -1and, exitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started