Question: for the MyLinkedList and try to implement the following methods : / * @author rawhi * * To modify 'Fork the project' * / public
for the MyLinkedList and try to implement the following methods : @author rawhi
To modify 'Fork the project'
public class Node
private Object data; private
public Node next; public
public NodeObject newData
data newData;
next null;
public Object getData
return data;
public void setDataObject newData
data newData;
Method void addListMyLinkedList list: Adds list to the existing list.
Method void copyListMyLinkedList list: Copies list into the existing
list.
Method Object getMin: Returns the data of the node with the minimum value
compared to other values in the list.
Method void reversePrint: Prints the data of the list in reverse order without
changing the original order.
Method boolean replaceNodeNode newNode, int pos: Replaces the node
at the specific position pos with newNode and returns true if the process succeeds.
Method boolean updateDataObject newData, int pos: Updates the node
at the specific position pos with newData and returns true if the process succeeds.
Method Object toArray: Returns an array of objects equivalent to the
current linked list.
Method MyLinkedList toListObject array: Converts the array of objects
in the parameter to a linked list and returns the equivalent MyLinkedList.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
