
Main.cc
Objectives: Work with linked lists. Begin by downloading main.ce to your own lab2 directory. In this main you will see that I have created a linked list of random numbers. The numbers are between 1 and MAX_VALUE, but there are MAX_ITEMS of them in the list, so obviously there might be duplicates. You can also see that the running time of each of the functions is displayed on the screen (Although both of the functions are taking less than a second to run). Read through the code so that you see what it does. For this lab you are to implement two functions, and I have given you the prototypes for the functions. • The first function passes through the linked list and removes all occurrences of a single item form the linked list. For example, removeltem(50), will remove every occurrence of 50 in the list. To test your program, modify the main program to use a MAX_VALUE of 10 and MAX_ITEMS of 50. • The second function takes a list, and a split value, which for us the user will enter from the keyboard inside the main function, and creates two new lists, one having only numbers greater than the split value and one having only numbers less than the split value (The split value is not in either list). Note: The first function alters the original list, and the second function creates two new lists. Your program should be tested by printing the list and its size at every step. Submit your source code on Blackboard.