SCREENSHOT ,JAVA SAMPLE INPUT 1:   FOOD1356279 Carrot 0.250 1.5 FOOD8759007 Bazella 0.090 0.100 FOOD7988001 Rice 0.750 15 PFOD5378762 Red_Beans 0.430 4 PFOD5551783 Banana 0.450 1 ELEC7862545 Blender 12.750 1   SAMPLE INPUT2 : FOOD1356279 Carrot 0.250 1.5 FOOD8759007 Bazella 0.090 0.100 FOOD7988001 Rice 0.750 PFOD5378762 Red_Beans 0.430 4 PFOD

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

SCREENSHOT ,JAVA

SAMPLE INPUT 1:   FOOD1356279 Carrot 0.250 1.5 FOOD8759007 Bazella 0.090 0.100 FOOD7988001 Rice 0.750 15 PFOD5378762 Red_Beans 0.430 4 PFOD5551783 Banana 0.450 1 ELEC7862545 Blender 12.750 1

 

SAMPLE INPUT2 : FOOD1356279 Carrot 0.250 1.5 FOOD8759007 Bazella 0.090 0.100 FOOD7988001 Rice 0.750 PFOD5378762 Red_Beans 0.430 4 PFOD5551783 Banana 0.450 a1 ELEC7862545 Blender 12.750 1

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 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY