Question: 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
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 items 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.
Example:
Begin checking out items. When finished, type checkout.
carrots 4.99
apple_juice 3.00
soap 1.49
checkout
Contents of receipt.txt:
carrots $4.99
apple_juice $3.00
soap $1.49
Total $9.48
Using java eclipse
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
