Spring 2023 Assignment 1 (CS301p)
Spring 2023 Assignment 1 (CS301p)
01 (Graded)
Total Marks: 20
SEMESTER Spring 2023
CS301 P - Data Structures (Practical) Due Date: 17/05/2023
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
The assignment is submitted after due date.
The submitted code does NOT compile.
The submitted assignment file is other than .CPP format.
The submitted assignment file does not open or corrupted.
The assignment is copied (from other student or ditto copy from handouts or internet).
Uploading instructions
For clarity and simplicity, you are required to Upload/Submit only one .CPP file.
Don’t wait for grace day. Grace Day is given only if there is problem with LMS on due date. Submit your
solution within due date.
Note that no assignment will be accepted through email if there is any problem on grace day.
Do not use strcut . You have to implement Node class . Using struct will result in deduction of marks
Note: Use only Dev C++ IDE.
Objective
The objective of this assignment is to make you familiar with Linked List data structures and programming
techniques related to them.
GOOD LUCK
Marks: 20
Suppose you are working as a software developer for a company that sells various types of products. The company
wants to keep track of its inventory using a linked list data structure. You are asked to develop a C++ program that
will allow the company to add, remove and update products in their inventory using a linked list.
Requirements:
You have to use only Linked List data structure for this assignment. Your marks will be deducted if any
other data structure is used
Your program should perform the below mentioned operations on the output console:
1. Add a new product to the inventory: The user should be able to add a new product to the inventory by
providing the product name, product ID, quantity and price.
2. Remove a product from the inventory: The user should be able to remove a product from the inventory
by providing the product ID.
3. Update a product in the inventory: The user should be able to update the quantity or price of a product
in the inventory by providing the product ID.
4. Display the inventory: The user should be able to view the entire inventory, including the product
name, product ID, quantity and price.
Your program should be implemented using a linked list data structure, with each node representing a single
product in the inventory. Each node should contain product name, product ID, quantity and price.
Solution Guidelines:
1) Understand and practice the following topics before developing this assignment::
R Nodes
R List
R Linked List
RLinked List Methods
2) To save product information, use the Linked List data structure. Each product will be represented by a
node.Do not use strcut . You have to implement Node class . Using struct will result in deduction of
marks
Deadline: Your assignment must be uploaded / submitted on / before, Wednesday 17th May 2023