Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is in java eclipse. The program should recognize when you have inputed more than 1 of an item and automatically add to the quantity
This is in java eclipse.
The program should recognize when you have inputed more than 1 of an item and automatically add to the quantity without asking.
Since I cannot upload a txt file, the txt file looks like this.
Popcorn Butter 6 pkg 3.99 Laundry Detergent 2X Ultra Free Clear 50 oz 11.99 Lunchmakers Bologna 1.3 oz 0.75 Lunchmakers Ham 1.3 oz 0.75 Lunchmakers Turkey 1.3 oz 0.75 Breakfastmakers Mini Pancakes 2.6 oz 1.19 Lunchmakers Bologna 2.6 oz 1.19 Lunchmakers Ham 2.6 oz 1.19 Lunchmakers Turkey 2.6 oz 1.19 Elbows PLUS Multigrain 14.5 oz 1.99Directions Write a program that prints the total amount owed for a cart full of groceries to a text file, and saves the file to a folder on your computer's desktop named "Receipts". The program must satisfy the following requirements: 1. Asks the user to enter the name he/she wishes to give the .txt file. 2. Continuously asks the user to enter the name and size/weight of the 3. The program searches the file "PriceList.txt" for the price(s) of 4. The program formats the output so that it lists each item on the left, and 5. If the quantity of an item is greater than one, then the program... product, until the user enters "Done the item(s) entered. subtotal for that item aligned some space to the right. (i) .prints the quantity followed by O" and the price of one item in parentheses (i) ists the price for 1 item to the left of the subtotal (i).the subtotal reflecets the mumber of items. (iv) ...the total is printed at the end of list, separated by two newlines Directions Write a program that prints the total amount owed for a cart full of groceries to a text file, and saves the file to a folder on your computer's desktop named "Receipts". The program must satisfy the following requirements: 1. Asks the user to enter the name he/she wishes to give the .txt file. 2. Continuously asks the user to enter the name and size/weight of the 3. The program searches the file "PriceList.txt" for the price(s) of 4. The program formats the output so that it lists each item on the left, and 5. If the quantity of an item is greater than one, then the program... product, until the user enters "Done the item(s) entered. subtotal for that item aligned some space to the right. (i) .prints the quantity followed by O" and the price of one item in parentheses (i) ists the price for 1 item to the left of the subtotal (i).the subtotal reflecets the mumber of items. (iv) ...the total is printed at the end of list, separated by two newlines
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