Programming Homework Help

California State University Bakersfield Java Question

 

Modify the Book’s Arraylist class to include the following methods:
1) Switch – switch the first and last elements of the list – so a list of A,B,C,D,E becomes E,B,C,D,A.
2) Swap – receives 2 unequal indexes and switches them so if the list is A,B,C,D,E then swap(2,5) gives a list of A,E,C,D,B.
The workgroup leaders submits just code of the two new methods. You can copy the code into any text file.