File IntegerListTest.java contains a Java program that provides "menu-driven" testing for the IntegerList class. Copy both files to your directory, and compile and run IntegerListTest to see how it works. For example, create a list, print it, and search for an element in the list. Does it return the correct index? Now look for an element that is not in the list. Is the return vaue correct? Now sort the list and print it to verify that it is in sorted order.
Modify the code in these files as follows:
Add an option to the menu in IntegerListTest to test your new method. (You'll have to modify both the printMenu and dispatch methods.) Add to your lab document output showing the use of the menu to reverse sort an originally unsorted array.
Add an option to the menu in IntegerListTest to test your new method. The action associated with the menu item should prompt the user to enter the old and new values. Add to your lab document output showing the use of the menu to replace an element in an array.
Add an option to the menu in IntegerListTest to test your new method. The action associated with the menu item should prompt the user to enter the old and new values. Add to your lab document output showing the use of the menu to replace all of one copy of an element in an array. (You may have to generate several arrays to create one with at least one duplicate entry.)