Answered step by step
Verified Expert Solution
Link Copied!
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

image text in transcribed

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, exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students explore these related Databases questions