public class SingleList { SNode head = null; SNode tail = null; //Below is the Node class to be used for packets in //a singly linked list private class SNode { Packet p; // packet reference SNode next; //next pointer //Constructor for a Node, default private SNode (Packet p) { setPacket(p); this.next = null; } private void setNext(SNode s){ this.next = s; } private SNode getNext() { return next; } private void setPacket (Packet p) { this.p = p; } private Packet getPacket() { return p; } } //pre - p is a valid packet //post - a new node containing p has been added to the // end of the linked list public void addNode(Packet p){ System.out.println ("addNode not implemented yet"); } //post - if the list is empty, it returns "List empty\n" // if the list is not empty, it adds each packet to string along with // a \n after the packet public String toString() { System.out.println ("toString not implemented yet"); return ""; } // Use this main to test your list public static void main (String[] args) { } }