Question: using C++ Design and implement your own linked list class to hold a sorted list of integers in ascending order. The class should have member


using C++
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 (30%) an item in the list (in ascending order), deleting (15%) an item from the list, and searching (15%) the list for an item. Note: the search function should return the position of the item in the list (first item at position O) 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(5%), a class destructor(5%), and a class copy constructor (10%) for deep copy. Demonstrate (20%) your class with a driver program (be sure to include the following cases: insertion at the beginning, end (note that the list should alway insert in ascending order. However, in your test include a case where the inserted item goes at the beginning of the list), and inside the list deletion of first item last item, and an item inside, searching for an existingon 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. Previous Next
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
