Question: please help me with this code for negative balance (Java program).tks Problem Description The fourth problem adds an additional functionality to the current program. You

please help me with this code for negative balance (Java program).tks
Problem Description The fourth problem adds an additional functionality to the current program. You should indicate whether the cash balance is negative or positive. A negative cash balance denotes that the amount given by the customer is insufficient to process the current transaction. Input You will receive (from the user) the following as input (in order): The first and last name of the customer (e.g., Eric Poitras) The item to be purchased, identified through a barcode number (e.g., 1909238092) The cost of the item to be purchased by the customer (e.g., 8.50) The cash amount given by the customer (e.g., 10.00) Processing 1. Extract the product id and company id numbers 2. Calculate the balance for the transaction 3. Determine whether the balance is negative (true) or not (false) 4. Print the data stored in each variable in the corresponding format Output 1. Customer (Last, First): {LAST} {FIRST} 2 Item Number (Product Company): {PRODUCT}{COMPANY} 3. Item Cost (+ Sales Tax): {COST} 4. Change: (CASH) 5. Negative Balance (True/False): {ISNEGATIVE) Examples Input Output Customer (Last, First): Poitras Eric Eric Poitras Item Number (Product, Company): 8092 19092 1909238092 Item Cost (+ Sales Tax): 9.77 8.50 10.00 Change: 0.23 Negative Balance (True/False): false Customer (Last, First): Siegel Angela Angela Siegel Item Number (Product, Company]: 8095 19092 1909238095 Item Cost (+ Sales Tax): 8.63 7.5 Change: 138 110.0 Negative Balance (True/False): false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
