Question: Design and implement your own linked list class to hold a sorted list of integers in ascending order. The class should have member functions for
Design and implement your own linked list class to hold a sorted list of integers in ascending order. The class should have member functions for inserting an item in the list, deleting an item from the list, and searching the list for an item. Note: the search function should return the position of the item in the list (first item at position 0) and -1 if not found.
In addition, it should have member functions to display the list, check if the list is empty, and return the length of the list. Be sure to have a class constructor, a class destructor, and a copy constructor for deep copy. Demonstrate your class with a driver program (be sure to include the following cases: insertion at the beginning, end, and inside the list, deletion of first item, last item, and an item inside, searching for an existing/non-existing item, and modifying a list that was initialized to an existing list).
Deliverables: submit the following 1. A copy of your class definition and your driver program in a text file.
2. Screen shots showing your class meets the problem specifications. Note: if your class does not meet any of the specs, make sure to indicate so in your documentation.
on C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
