Question Description

Create a Program ReceiptMaker.java that continuously reads user inputs consisting of two parts – a String (one word) containing the item in question, and a double containing that item’s price – and inserts them into a file ‘receipt.txt’ (creating it if it has to) formatted such that both the item and price have 10 characters dedicated to them until the user types in ‘checkout’. Once checkout occurs, the total price of all the items should also be written to receipt.txt.

Create a Program ReceiptMaker.java that continuously reads user inputs consisting of two parts – a String (one word) containing the item in question, and a double containing that item’s price – and inserts them into a file ‘receipt.txt’ (creating it if it has to) formatted such that both the item and price have 10 characters dedicated to them until the user types in ‘checkout’. Once checkout occurs, the total price of all the items should also be written to receipt.txt.