import java.util.*; public class SorterRunner { ArrayList persons; ArrayList savingsAcct; ArrayList list; public SorterRunner() { ArrayList strs = new ArrayList(); savingsAcct = new ArrayList(); persons = new ArrayList(); Person misha = new Person("Misha", 2 ) ; Person stanSpawn = new Person("Lin", 666); Person theManBoy = new Person("Paul", 32 ) ; persons.add( misha) ; persons.add( stanSpawn ) ; persons.add( theManBoy) ; Account mishasAcct = new SavingsAccount(100, misha ); savingsAcct.add(mishasAcct) ; savingsAcct.add( new SavingsAccount(300, stanSpawn)) ; savingsAcct.add( new SavingsAccount(200, theManBoy )) ; sortPersons(); sortAccts() ; sort(savingsAcct); sort(persons); } public static void selectionSort1(int[] x) { for (int i=0; i x[j]) { //... Exchange elements int temp = x[i]; x[i] = x[j]; x[j] = temp; } } } } public void sortPersons(){ for (int i=0; i 0) { //... Epersonschange elements Comparable temp = persons.get(i); //WHAT TO CALL A PERSO METHOD???? Person tempAsAPersonObj = (Person)persons.get(i); persons.set(i, persons.get(j ) ); persons.set(j,temp) ; } } } } public void sortAccts(){ for (int i=0; i 0) { //... Epersonschange elements Comparable temp = savingsAcct.get(i); //BELOW SHOWS HOW WE'D Account a = (Account)savingsAcct.get(i); savingsAcct.set(i, savingsAcct.get(j ) ); savingsAcct.set(j,temp) ; } } } } public void sort(ArrayList list){ for (int i=0; i 0) { //... Epersonschange elements Comparable temp = list.get(i); list.set(i, list.get(j ) ); list.set(j,temp) ; } } } } }