import java.awt.*; // You will need to modify this, but it should give you some ideas. public class ArrayOperations { private int[] xToSort; public ArrayOperations(int n) { xToSort = new int[n]; } public ArrayOperations() {} public void fillSortArray() { int max = 1000; // largest integer value in array for (int i = 0; i < xToSort.length; i++) { xToSort[i] = (int) (max * Math.random()); } } public void callTheSort(String sortMethod) { if (sortMethod.equals("selection")) Sorts.selectionSort(xToSort); else if (sortMethod.equals("insertion")) Sorts.insertionSort(xToSort); else if (sortMethod.equals("bubble")) Sorts.bubbleSort(xToSort); else if (sortMethod.equals("shell")) Sorts.shellSort(xToSort); else if (sortMethod.equals("merge")) Sorts.mergeSort(xToSort); else if (sortMethod.equals("quickSort")) Sorts.quickSort(xToSort); else System.out.println("Sorry, no such sort"); } // Performs operations needed for 1 sort public double doOneSort(String sortMethod) { . . . } }