Write a program that will add the following operation to the class LinkedListType that is provided to you on blackboard. The program must provide two additional functions that do the following:
search: Searches a list for a specified value. If the value is found, it should return a number indicating its position in the list. The first node is node 1, the second node is node 2, and so forth.) If the value is not found, the function should return 0.
divideAt: Divide a list at the node with a specific value. This means two list will result at the divide.
This program requires that you add the search and divideAt functions to the class provided on blackboard that performs the indicated tasks described. You must also demonstrate the function in a driver program. The program should print out the location of a search node and the separated list after division of the list. A sample driver program is provided that builds the list and does a simple search. A re-write of the driver is required to test all possible occurrences.
The program should produce output as given below.
Suppose myList points to the list with the elements 25, 35, 45, 55, 65, 75, 85, 45 (in this order). The statement myList.search (45);
will return 3 for the position. and the statement
myList.divdeAt (otherlist, 45);
will divide myList into two sublists where myList points to the list with 25, 35 and otherList points to the sublist with elements 45, 55, 65, 75, 85
myList.searchAll (45); will return 3 8 for the positions.
Program Specifications
The program you develop must have the following characteristics:
It must modify the class definition provided with this assignment
It must declare any additional necessary variables required in the program
It must test for all possible occurrences of data (if it is in the list, if it is not in the list, if it appears multiple times).
It must be commented adequately
o Label the class members provided with the assignment and added by you o Label each function call
o Before each function, give a brief description of what the function will do