public class MyLinkedList implements MyList { private Node head; private int size; public MyLinkedList() { head = null; size = 0; } // appends elem to the end public void add( E elem ) { } public void add( int index, E elem ) { } // replaces the element at index with elem // returns the element previously at index public E set(int index, E elem) { return null; } // returns the element at index public E get(int index) { return null; } // removes first occurrence of elem if found, // shift subsequent elemenets up, and return true, // else return false and no changes are made public boolean remove( E elem ) { return false; } public E remove(int index) { return null; } public void clear() { } // returns the index of the first occurrence of elem // or -1 if elem not found public int indexOf(E elem) { return 0; } public int lastIndexOf(E elem) { return 0; } // returns true if this list contains elem, false otherwise public boolean contains(E elem) { return false; } public boolean isEmpty() { return false; } // returns the number of elements in list public int size() { return 0; } public String toString() { String str = ""; Node current = head; while (current != null) { str += current.element; // check if end of list if( current.next != null ) str += " "; // advance to next node current = current.next; } return str; } }