Today's lab concerns singly linked lists. As before, mail me a _text_ file of your work at the end of the lab or when you're through working on it. Make a directory for this lab, change to it, and copy the files from ~lorenz/cs35-2/lab4/ into it. 1) Inspect the file "linkedlist.java". It is a template for the code you'll write in this lab. Notice the nested class "Node" within the class "LinkedList". Although this file is missing a lot of code, it should compile. Check that it does before going further. 2) Compile the file "names.java". It defines a class that produces objects that make arrays of names. In particular, it uses the login names on the allspice server -- your login for this course will (should) be in the list. To use this class, create a Names object Names names = new Names(); and then call the method .shuffle() to get a randomly ordered array of strings representing the login names: String[] nameArray = names.shuffle(); In the "Main" class' "main" method you'll find such statements already written for you. 3) Write various constructors, methods, and fields for the "LinkedList" class. Recompile, test (as best possible), and debug after every step. a) fill in the constructor for the "Node" class b) write the "insertHead" method c) write the "print" method. It should walk the list from head to tail, printing Node content fields along the way. d) read and run the code in "main". It should now function that you've build "insertHead" and "print". e) overload the "print" method to take an integer parameter of the number of list elements to print. Modify "main" to print only a few elements (e.g. 10) -- this will simplify debugging the remaining exercises. f) write the "deleteHead" method; throw meaningful exceptions. Test it from "main". Try calling "deleteHead" before anything has been inserted into the list. g) write the "length" method to count and return the number of elements on the list. Use it to find the length of "linkedNames". h) in addition to the "length" method, add an integer "length" field variable to the "LinkedList" class. On inserts, increment this field; on deletes, decrement it. In "main" after the names have been placed on the "linkedNames" list, compare the value in the .length field with the one .length() returns. (They should be the same.) i) write the "find" method that returns the position of its String parameter s in the linked list. Return -1 if s is not in the list. Modify "main" to find and print the position of your login name in the linkedNames list. Recall, s.compareTo(t) returns 0 if strings s and t are the same (case matters!). j) in "main", call "deleteHead" repeatedly (in a loop) to remove all names before yours. k) write the "append1" method to append a new node at the tail of the list. (Hints: use two variables to walk the list; one to point at the current node and the other to point at the previous node. Handle the special case when head is null separately.) l) write the "reverse" method to reverse the list. (Hints: walk the list from head to tail, creating a new "Node" object for each encountered node. Hook such a newly created node to the node created for the previously visited node in the list being reversed. The chain of new nodes is the initial list in reverse. Store this new chain (list) of nodes into the "head" variable.) m) make the "LinkedList" class polymorphic by changing the content field of the "Node" class to type "Object". Make changes in the other methods as well. Some methods (e.g., "find") may need to be removed since "Object" objects cannot be readily compared.