Question: *PLEASE COMPLETE IN JAVA** *PLEASE COMPLETE IN JAVA***PLEASE COMPLETE IN JAVA** * Problem Description A cash register has a balance. Before each transaction, there is
*PLEASE COMPLETE IN JAVA** *PLEASE COMPLETE IN JAVA***PLEASE COMPLETE IN JAVA**
*
Problem Description A cash register has a balance. Before each transaction, there is a certain amount of money available in the register. Of course, a transaction is only possible if there is enough change available in the register, otherwise it should be canceled. In this problem, you will add to your previous programs to display whether or not a transaction was canceled, and provide an error message if it was. Input You will receive (from the user) the following as input (in order): - (double) The current balance of the cash register (e.g., 100.0) - (double) The amount that was paid by the customer (e.g., 20.0) - (double) The cost of the item purchased by the customer (e.g., 15.99) Processing 1. Calculate the amount of change to return to the customer 2. Calculate the cash register balance 3. Determine whether a transaction is canceled or not (if there is not enough cash in the register) 4. Determine whether a transaction is complete or not (if the customer has paid enough cash for the items) Hint: You may want to consider using a "nested if-statement" for this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
