Description: Students will create a linked list structure that will be used to support an electronic library. Using the class structure from programming assignment #3, instead of using ArrayList for each type of library item, the new program will use linked lists.
Note that you will not be using the existing Java class LinkedList, you will be using the provided linked list code and modifying it. Demonstrating your code for two library item classes is required (i.e. book and song, or just song and video).
The program will use the linked list structure to do the following functions;
1) add to the front
2) add to the end
3) remove from the end. The program must throw an exception if the program attempts to remove an item from an empty list.
4) remove from the front
5) search for an item by index number (the number of its position in the list) and display the information for that library item. The code must validate that the index number is within bounds and throw an appropriate exception if not.
6) print all items in the library (print out both lists) and the total number of items As a starting point, students may use their class structure from programming assignment #3. In addition, you are provided with a generic program called "SomeList" which provides the list structure and the ability to insert at front, remove it from the front, tell if the list is empty (enables throwing an exception if trying to remove from an empty list), and prints the list contents (remember that you must override the ToString in each subclass in order for this print method to display the contents as a string). Note that the provided code uses a loop to traverse the list in order to print. A similar traversal loop can be used to search for a specific index. Once a specific index is found it can be used to display the contents of the node. A "size" method is also included as an enabler for your additional methods. You will add the additional functions 2, 3, and 5 to the SomeList program. In addition, you will create your own ListTest program that creates electronic library item lists and demonstrates all of the required program functions. Make sure to include all your program files and execution screenshots demonstrating all requirements.