- The Node class must be placed in a package called csci1902.lab3.
- The requirements for the constructors and methods of the Node class are not given.
- You will need to design this class yourself. Remember, you are expected to follow good object-oriented design principles.
- You will use this class when implementing your LinkedList class.
Write a class called Node.
- The Node class must be placed in a package called csci1902.lab3.
- The LinkedList class must be placed in a package called csci1902.lab3.
- Write a main method in your LinkedList class that tests your class thoroughly. Make sure your main method tests all six cases of the LinkedList constructor, and all public methods of the LinkedList class.
- The detailed requirements for the LinkedList class are described below.
Write a class called LinkedList.
Begin by writing an instantiable class called LinkedList. LinkedList will maintain a
singly-linked list of Node objects. Each Node object will contain exactly one Object object.- The LinkedList class must be placed in a package called csci1902.lab3.
- The public interface to the LinkedList class is given below -
all other details of the implementation should be hidden from the user.
Note that this is unlike our text's implementation, which requires that the
programmer be familiar with the list structure, test for a null list, etc.,
and it is even more abstracted than the examples using Node.java, and
NewNode.java given in lecture. - Specifically, the individual Node objects within the
list are hidden from the programmer. For example, there is no way for a user
of the List class to access any of the "next" reference fields that exist
within nodes of a List. - When sorting contents of the LinkedList, use alphabetic sorting based on the
toString representation of the objects being sorted.
Posted from Diigo. The rest of my favorite links are here.