i. int insertSortNoDuplicate(Object object) that will insert an object at correct position in the ascending (increasing) order. The method also will return -1 if the given object already exists in the current list, otherwise returns 0.
ii. Iterator getIterator(int order) that will return an Iterator object reference that will traverse the elements on the current based on the value of order. If the order is 0 then will traverse from head to tail, otherwise it will traverse from tail to head.
iii. void updateList(MyLinkedList otherlist) that will update the current list with a given otherlist. If an element in current list exists in the otherlist then replace (update) it, otherwise insert (add) it using the above insertSortNoDuplicate method.© BrainMass Inc. brainmass.com October 25, 2018, 9:02 am ad1c9bdddf
See the attached file.
This response works with following type of linked list node.
private class Node
public Student value;
Attached archive 562134.zip contains three files: MyLinkedList.java, Student.java, and TestMyLinkedList.java .
After unzipping the archive, go to folder ...
Java version "1.7.0_21" was used during development of this program.