Question: ASSIGNMENT 1 Your first assignment in this block will be using linked list data struture for implementing a small Product Management System in Java language.

 ASSIGNMENT 1 Your first assignment in this block will be using

ASSIGNMENT 1 Your first assignment in this block will be using linked list data struture for implementing a small Product Management System in Java language. Each product has the following information: pcode (String type) product name (String type) quantity (int) price (double) The information of the product list is stores in the file "products.txt" with the format: For example: PO3 Sugar | 12 25.1 P01 | Miliket | 10 | 5.2 PO2 Apple | 5 4.3 P10 | Cookies | 9 | 6.5 PO5 Rose | 7 | 15.4 PO7 Beer | 11 | 12.2 P04 | Book | 9 | 5.2 YOUR TASK: 1. Reading the list of the products from the file, check if the name contains Cookie" or price > 30 then do nothing, otherwise, add in the linked list with the reserve order. You should create linked lists from scratch, do not use list structures available in java like ArrayList, Vector or LinkedList classes. 2. Traverse the linked list you just created. 3. Delete all the products which have the second highest price. For input above, the second highest price is 15.4 4. Traverse the list after step 3. 5. Sort the list by ascending order of the name. 6. Write the list after step 5 to the file "output.txt" with the same format of the input file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!