This Java program calculates the change to be given based on the price of an item and the amount tendered by the customer.
-
Clone the Repository:
git clone https://github.com/danielriggi/MakeChangeProject.git cd MakeChangeProject/src -
Compile and Run:
javac makechange/CashRegister.java java makechange/CashRegister
Follow the on-screen instructions to input the price of the item and the amount tendered by the customer.
-
View the Change: The program will calculate the change and display the breakdown of bills and coins to be returned to the customer.
What is the price of the item?
3.96
What is the amount tendered by the customer?
20.00
1 ten dollar bill, 1 five dollar bill, 1 one dollar bill, 4 pennies.