Question: Task 1: Create an ordered list class. 1. Create a new project. You can name this whatever you like. 2. Design and implement an ordered
Task 1: Create an ordered list class. 1. Create a new project. You can name this whatever you like. 2. Design and implement an ordered list class using an array of pointers as described in class. This class should be a template. a. The class should have an array that holds 25 items. b. The AddItem method should start at the front of the array (index 0) when searching for a place to insert a new item. c. The RemoveItem method should ensure that the items in the array are still in order and there are no empty spots between items. d. The class should include IsEmpty, IsFull and MakeEmpty methods. 3. Any error conditions encountered such as the item to be removed doesnt exist or the list is full when trying to add an item should throw a custom error class. Complete this before moving on to task 2. Task 2: Create a derived class from the class created in Task 1. This version of the class is to investigate the theory that by starting from the middle (index 12), fewer items will need to be moved on every insert 1. This version should have the AddItem method start from the middle of the array when searching for a place to insert a new item. 2. Modify RemoveItem so that it begins its search in the middle of the array in a similar manner to step 2.1 above. 3. This version may move left or right when inserting but cant go past the end of the array. If there is still room in the array but not in the direction needed, you will need to shift everything over when inserting. Complete this before moving on to task 3. Task 3: Create another derived class from the class created in Task 1. This version of the class is to investigate leaving blank spots (points to a null) in the array can reduce the number of moves when inserting. 1. Modify the AddItem method to insert an item halfway between any two items in the array where it belongs. It should only move items in the array if the inserting item sits between two items that are in contiguous locations. 2. Modify the RemoveItem method so that it will not move any items in the array. Instead it
will just make that spot = to null.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
