//File: NumberList.java import CSLib.*; import java.io.*; import java.util.StringTokenizer; public class NumberList { //INPUT FUNCTIONS //IN: InputBox //OUT: List of ints public static int [] inputList (InputBox inBox) { inBox.setPrompt("How many items in your list? "); int n=inBox.readInt(); //allocate n memory locations for array x int [] x = new int [n]; //fill the array x with values from the user for (int k=0; k=0 && list[j]>currentItem) //stops when finds a smaller item { //looking for place to put list[i] //so moving elements to the right //to make room list[j+1] = list[j]; //jth item --> j+1 slot j--; } //list[i] goes into the j+1 slot immediately to right of smaller item list[j+1] = currentItem; } } static void swap (int [] list, int i, int j) { int temp = list[i]; list[i] = list[j]; list[j] = temp; } static void selectionSort (int [] list) { for (int k=0; k