Question: CS 241: Object Oriented Programming using C++ Spring 2021 Homework 2 Write a CH program that simulates a cash register machine which helps the cashier
CS 241: Object Oriented Programming using C++ Spring 2021 Homework 2 Write a CH program that simulates a cash register machine which helps the cashier give back the correct change to the customer. The program should ask the user to enter the total purchase amount then ask for the amount paid by the customer. Once the program reads these two values, it should display the change that should be handed back to the customer broken down into: . The number of twenty-dollar bills The number of ten-dollar bills The number of five-dollar bills The number of one-dollar bills The number of quarters The number of dimes The number of nickels The number of pennies The following figure illustrates how the output of the program should look like. Please enter the total purchase amount : 126.07 Enter the amount paid by customer. 200.00 Total Purchase Amount: $126.07 Payment. .: $200 Change $73.93 Twent les ) (560) Tens....1 ($10) Fives... (50) Ones....(53) Quarters: 3 ($0.75) Dimes... 11 ($0.1) Nickels.: 1 (50.05) Pennies. : 3 (se.es) In the above example, it is assumed that the total purchase amount was $126.07 and the customer handed the cashier $200. So, the user entered 126,07 in response to the first prompt about the total purchase amount, then entered 200.00 in response to the second prompt regarding the amount paid by the customer. Once the user entered the values, the program calculated and displayed the values entered as well as the change (573.93) and its completo break down. Your program should work for any purchase amount and any payment amount. When you are finished, submit your source code file in Blackboard
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
