Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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(),

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: DeleteSecond(SinglyLinkedList L) is a public method that delete the second element in a given list L. Implement and test DeleteSecond. In terms of Big-O, what is the time complexity for DeleteSecond.

Task 4: Assume that DeleteSecond is a member function of the SinglyLinkedList, write the DeleteSecond it in an efficient way. Compute the complexity for DeleteSecond 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions