va with screen shot for the code

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

java with screen shot for the code

Sample input/output files:
FOOD1356279 Carrot 0.250 1.5
FOOD8759007 Bazella 0.090 0.100
FOOD7988001 Rice 0.750 15
Enter input file name: data.txt
Error: data.txt not found!
Enter input file name: item.dat
PFOD5378762 Red_Beans 0.430 4
PFOD5551783 Banana 0.450 1
Error: item.dat not found!
Enter input file name: item_1.txt
ELEC7862545 Blender 12.750 1
Bill
Code
Name
Price
Amount
ELEC7862545
Blender
14.663
1.
FOOD7988001
Rice
11.250
15.000
PFOD5378762 Red_Beans
PFOD5551783 Banana
1.720
4
0.450
FOOD1356279
Carrot
0.375
1.500
FOOD8759007 Bazella
0.009
0.100
Amount Due =
28.467
Sample 1: input file (left) and its corresponding output (right)
FOOD1356279 Carrot 0.250 1.5
FOOD8759007 Bazella 0.090 0.100
FOOD7988001 Rice 0.750
Enter input file name: badData.txt
line 3 Wrong item information 3
line 5 Bad data: For input string: "a1"
PFOD5378762 Red_Beans 0.430 4
PFOD5551783 Banana 0.450 a1
ELEC7862545 Blender 12.750 1
Bill
Code
Name
Price
Amount
ELEC7862545
Blender
14.663
1
PFOD5378762 Red_Beans
1.720
4
FOOD1356279
Carrot
0.375
1.500
FOOD8759007 Bazella
0.009
0.100
Amount Due =
16.767
Sample 2: input file (left) and its corresponding output (right)
Transcribed Image Text:Sample input/output files: FOOD1356279 Carrot 0.250 1.5 FOOD8759007 Bazella 0.090 0.100 FOOD7988001 Rice 0.750 15 Enter input file name: data.txt Error: data.txt not found! Enter input file name: item.dat PFOD5378762 Red_Beans 0.430 4 PFOD5551783 Banana 0.450 1 Error: item.dat not found! Enter input file name: item_1.txt ELEC7862545 Blender 12.750 1 Bill Code Name Price Amount ELEC7862545 Blender 14.663 1. FOOD7988001 Rice 11.250 15.000 PFOD5378762 Red_Beans PFOD5551783 Banana 1.720 4 0.450 FOOD1356279 Carrot 0.375 1.500 FOOD8759007 Bazella 0.009 0.100 Amount Due = 28.467 Sample 1: input file (left) and its corresponding output (right) FOOD1356279 Carrot 0.250 1.5 FOOD8759007 Bazella 0.090 0.100 FOOD7988001 Rice 0.750 Enter input file name: badData.txt line 3 Wrong item information 3 line 5 Bad data: For input string: "a1" PFOD5378762 Red_Beans 0.430 4 PFOD5551783 Banana 0.450 a1 ELEC7862545 Blender 12.750 1 Bill Code Name Price Amount ELEC7862545 Blender 14.663 1 PFOD5378762 Red_Beans 1.720 4 FOOD1356279 Carrot 0.375 1.500 FOOD8759007 Bazella 0.009 0.100 Amount Due = 16.767 Sample 2: input file (left) and its corresponding output (right)
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.
Provide required classes for items with constructors, accessor, and mutator methods.
Your tester class Hw3_yourID includes methods to:
• Get correct input file name
• Read the list of items
Sort the list of items in decreasing order using selection sort method
• Display the data and compute the total amount due
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. Provide required classes for items with constructors, accessor, and mutator methods. Your tester class Hw3_yourID includes methods to: • Get correct input file name • Read the list of items Sort the list of items in decreasing order using selection sort method • Display the data and compute the total amount due
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Introduction to Interface
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education