Problem: An online grocery store sells items on a web page. A user adds items to a basket and he clicks on the submit button when he completes. The store sells food and electronic items. The electronic items require VAT payment of 15 percentage of their prices. There are packed and lose food. The lose food is measured in weights. User specifies the weight amount or the quantity in his selection of items depending on its type. The price is computed as the product of the price per item or the price per weight and the weight or quantity are given by the user. Write an application that reads a user basket list and produces the bill receipt. Check the given samples of input/output in the figures below. The bill receipt contains the list of item details in decreasing order according to the price computed for each item. Use the selection sort' to sort the items in the list and do not use java given sort method. Selection sort is an algorithm used to arrange elements in a list. It selects the smallest element from an unsorted list in each iteration and places that element at the beginning of the unsorted list.
Problem: An online grocery store sells items on a web page. A user adds items to a basket and he clicks on the submit button when he completes. The store sells food and electronic items. The electronic items require VAT payment of 15 percentage of their prices. There are packed and lose food. The lose food is measured in weights. User specifies the weight amount or the quantity in his selection of items depending on its type. The price is computed as the product of the price per item or the price per weight and the weight or quantity are given by the user. Write an application that reads a user basket list and produces the bill receipt. Check the given samples of input/output in the figures below. The bill receipt contains the list of item details in decreasing order according to the price computed for each item. Use the selection sort' to sort the items in the list and do not use java given sort method. Selection sort is an algorithm used to arrange elements in a list. It selects the smallest element from an unsorted list in each iteration and places that element at the beginning of the unsorted list.
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter5: The Repetition Structure
Section: Chapter Questions
Problem 14E
Related questions
Question
Solve in Java
![Problem:
An online grocery store sells items on a web page. A user adds items to a basket and he clicks
on the submit button when he completes. The store sells food and electronic items. The
electronic items require VAT payment of 15 percentage of their prices. There are packed and
lose food. The lose food is measured in weights. User specifies the weight amount or the
quantity in his selection of items depending on its type. The price is computed as the product
of the price per item or the price per weight and the weight or quantity are given by the user.
Write an application that reads a user basket list and produces the bill receipt. Check the
given samples of input/output in the figures below.
The bill receipt contains the list of item details in decreasing order according to the price
computed for each item. Use the selection sort' to sort the items in the list and do not use
java given sort method.
Selection sort is an algorithm used to arrange elements in a list. It selects the smallest element
from an unsorted list in each iteration and places that element at the beginning of the unsorted
list.
Sample input/output files:
FOOD1356279 Carrot 0.250 1.5
FOOD8759007 Bazella 0.090e e. 100
FOOD7988001 Rice 0.750 15
PFOD5378762 Red Beans 0.430 4
PFOD5551783 Banana 0.450 1
ELEC7862545 Blender 12.75e 1
Enter input file name: data.txt
Error: data.txt not found!
Enter input file name: item.dat
Error: item.dat not found!
Enter input file name: item_1.txt
Bill
Code
Name
Price
Amount
ELEC7862545 Blender
FO007988001 Rice
14.663
11.250
1.720
0.450
1
15.000
PFO05378762 Red Beans
PFOD5551783 Banana
FOOD1356279 Carrot
FOOD8759007 Bazella
4
1
0.375
0.009
1.500
e. 100
Amount Due =
28.467
Sample 1: input file (left) and its corresponding output (right)
FOOD1356279 Carrot 0.250 1.5
FOOD8759807 Bazella 0.090 0.100
FOOD7988001 Rice 0.750
PFOD5378762 Red Beans e.430 4
PFODS551783 Banana 0.450 al
ELEC7862545 Blender 12.750 1
Enter input file name: badData,txt
line 3 Wrong item information 3
line 5 Bad data: For input string: "al"
Bill
Code
Name
Price
Amount
ELEC7862545 Blender
PFOD5378762 Red Beans
FOOD1356279 Carrot
14.663
1.720
0.375
0.009
1.500
0.100
FOOD8759007 Bazella
Amount Due =
16.767
Sample 2: input file (left) and its corresponding output (right)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8b93096f-376b-41f3-b0a9-31e416115dec%2F0784f604-88f0-4f9d-bbd2-7f7e54e512f7%2Fz33rf2j_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Problem:
An online grocery store sells items on a web page. A user adds items to a basket and he clicks
on the submit button when he completes. The store sells food and electronic items. The
electronic items require VAT payment of 15 percentage of their prices. There are packed and
lose food. The lose food is measured in weights. User specifies the weight amount or the
quantity in his selection of items depending on its type. The price is computed as the product
of the price per item or the price per weight and the weight or quantity are given by the user.
Write an application that reads a user basket list and produces the bill receipt. Check the
given samples of input/output in the figures below.
The bill receipt contains the list of item details in decreasing order according to the price
computed for each item. Use the selection sort' to sort the items in the list and do not use
java given sort method.
Selection sort is an algorithm used to arrange elements in a list. It selects the smallest element
from an unsorted list in each iteration and places that element at the beginning of the unsorted
list.
Sample input/output files:
FOOD1356279 Carrot 0.250 1.5
FOOD8759007 Bazella 0.090e e. 100
FOOD7988001 Rice 0.750 15
PFOD5378762 Red Beans 0.430 4
PFOD5551783 Banana 0.450 1
ELEC7862545 Blender 12.75e 1
Enter input file name: data.txt
Error: data.txt not found!
Enter input file name: item.dat
Error: item.dat not found!
Enter input file name: item_1.txt
Bill
Code
Name
Price
Amount
ELEC7862545 Blender
FO007988001 Rice
14.663
11.250
1.720
0.450
1
15.000
PFO05378762 Red Beans
PFOD5551783 Banana
FOOD1356279 Carrot
FOOD8759007 Bazella
4
1
0.375
0.009
1.500
e. 100
Amount Due =
28.467
Sample 1: input file (left) and its corresponding output (right)
FOOD1356279 Carrot 0.250 1.5
FOOD8759807 Bazella 0.090 0.100
FOOD7988001 Rice 0.750
PFOD5378762 Red Beans e.430 4
PFODS551783 Banana 0.450 al
ELEC7862545 Blender 12.750 1
Enter input file name: badData,txt
line 3 Wrong item information 3
line 5 Bad data: For input string: "al"
Bill
Code
Name
Price
Amount
ELEC7862545 Blender
PFOD5378762 Red Beans
FOOD1356279 Carrot
14.663
1.720
0.375
0.009
1.500
0.100
FOOD8759007 Bazella
Amount Due =
16.767
Sample 2: input file (left) and its corresponding output (right)
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,