// // p.97 // Goal: read integers from a file and sort them // import java.util.Scanner; class SortData { public static void main(String[] args) { Scanner input = new Scanner(System.in); int item; List zList = new List(); while(input.hasNextInt()) { item = input.nextInt(); zList.Insert(item); } System.out.println("List is: "); zList.Print(); zList.SelSort(); System.out.println("After sort, the list is: "); zList.Print(); zList.SelDescSort(); System.out.println("After sort to desc., the list is: "); zList.Print(); System.out.println("\n\nDone.\n\n"); } }