Answered step by step
Verified Expert Solution
Question
1 Approved Answer
COSC 1 1 1 , Machine Problem # 1 5 0 points Due Date: 1 / 2 2 / 2 0 2 4 midnight Write
COSC Machine Problem # points Due Date: midnight Write a Java program that plays the role of a cash register. The program is to work as follows: Define Five constants, DOLLAR, QUARTER, DIME, NICKEL, PENNY. points Next define two variables, the amount of sale and assign any amount, and the amount tendered and assign any amount should be bigger or equal to the amount of sale points a Compute the total change in pennies, the difference between the amount tendered and the amount of sale, multiplied by points b Compute the number of dollar bills, by taking the remainder of the change and the DOLLAR then use the remainder change to computer the quarters, and so on for the dimes, nickels and cents. points c Display the total change, and its denominations Dollars, quarters, dimes, nickels, and cents. points YOUR OUTPUT MUST LOOK LIKE THE SAMPLE BELOW. THE AMOUNT OF SALE: $ THE AMOUNT TENDERED BY CUSTOMER: $ TOTAL CHANGE $ DOLLARS QUARTERS DIMES NICKELS CENTS THANK YOU FOR USING your name CASH REGISTER PROGRAM Run your program several times, each time with a new pair of data from below: Amount of Sale Amount Tendered Please turn in the following together but not zipped, upload them separately to canvas: The source code. Screen shots of all the five outputs. General Rubric for programming assignments Commentsproper identificationindentation o Add names of all authors, class, assignment # and purpose to the program points o Use additional comments explaining your steps at least once every five lines. points o Use proper indentation points o Compilationexecution pts distributed above o You will get score if it does not have output. You will get if the output is wrong.
Step 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