In the MyLinkedList class MyLinkedList ( private Node firstNode; private int length; public MyLinkedList (
Posted: Mon Jul 11, 2022 9:55 am
questions. // index = 0 } public boolean add (int index, Object newEntry) { } public boolean contains (Object anEntry) { } public Object getEntry (int index) { public int get Index (Object anEntry) ( public Object remove (int index) { } public Object remove (Object anEntry) { public boolean replace (int index, Object public boolean equals (Object other) public int getLength() {} public boolean isEmpty() {-} public String toString() {-} private Node getNode (int index) ( - ) private class Node { private Object data; // data portion private Node next; // link to next node private Node (Object dataPortion) ( - ) private Node (Object dataPortion, Node nextNode) ( - ) private void setData (Object dataPortion) { } private Object getData() {-} private void setNextNode (Node nextNode) ( - ) private Node getNextNode () { } } // end Node } // end MyLinkedList b) a) Write Java code for method get Index. Write Java code for method remove. c) Write Java code for method replace. d) Write Java code for method equals. } // QUESTION (a) } // QUESTION (b) newEntry) { } // QUESTION (c) // QUESTION (d)
<Linked Lists>In the MyLinkedList class MyLinkedList ( private Node firstNode; private int length; public MyLinkedList () { public boolean add (Object newEntry) { } class, write Java code for the following