Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CS 252 Data Structures Assignment #1 January 31, 2021 Due Date: 15 February 2021 (11 pm) Task 1: Reimplement the linked list ADT according to
CS 252 Data Structures Assignment #1 January 31, 2021 Due Date: 15 February 2021 (11 pm) Task 1: Reimplement the linked list ADT according to the following: The list has only the head attribute. The list has the following methods: delete(), insetFirst(), insertLast(), size(). empty(), deleteFirst(), deletelast(), first, and last(). Task2: Use Big-O notation to analyze the methods that you implement in task 1. Task 3: Delete Second(SinglyLinkedList L) is a public method that delete the second element in a given list L. Implement and test Delete Second. In terms of Big-O, what is the time complexity for Delete Second. Task 4: Assume that Delete Second is a member function of the SinglyLinkedList, write the Delete Second it in an efficient way. Compute the complexity for Delete Second and compare it with the method in Task 3. Task 5: In this task, you will implement an online furniture-shop system. In real life cases, such a shop sells many types of products, for the sake of simplicity, our system will only sell two products beds and desks. However, your design should consider adding new types of products in the future (Please check the files in the attached products folder to have an intuition of the products proprieties). The system should enable the user to view the products in the store. The system should allow the users to add the products they wish to buy to a shopping cart. It also should allow the user to remove a product item from the shopping cart, and view the products in the shopping cart. For viewing the items, the system allows the user to filter the item by price (max and min). The system also allows the user to search items by color. Draw the class diagrams for the system. Implement and test the systems. Use a driven menu to display the above requirements properly. You need to check the file to design your classes correctly. Make sure you use the data structures that you have learned about so far (For example linked list) in your solution
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started