Question: Language: Java Modify the author's MyLinkedList class to add the following methods. Perform checking of the parameters and throw exceptions where appropriate. Link: http://users.cs.fiu.edu/~weiss/dsaajava3/code/MyLinkedList.java? a
Language: Java
Modify the author's "MyLinkedList" class to add the following methods. Perform checking of the parameters and throw exceptions where appropriate. Link: http://users.cs.fiu.edu/~weiss/dsaajava3/code/MyLinkedList.java?
a Swap receives two index positions as parameters and swaps the two nodes (the nodes, not just the values inside) at these positions, provided both positions are within the current size b. reverse returns a new Miakedist that has the elements in reverse order. c. erase receives an index position and number of elements as parameters, and removes elements beginning at the index position for the number of elements specified, provided the index position is within the size and together with the number of elements does not exceed the size receives a List and an index position as parameters, and copies all of the passed list into the existing list at the position specified by the parameter, provided the index position does not exceed the size e. shift receives an integer and shifts the list this many nodes forward or backward, for example, if passed 2, the first two nodes move to the tail, or if passed -3, the last three nodes move to the front. I. main add code to the main method to demonstrate each of your methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts

