All pastes #383496 Raw Edit

AlphabeticalSort

public java v1 · immutable
·published 2007-03-06 12:23 UTC
rendered paste body
/** * @(#)testArrayList.java * * * @author Michael Cecconet * @version 1.00 2007/3/5 */import java.util.Arrays;import java.util.ArrayList;public class testArrayList {    static ArrayList<student> studentTracker = new ArrayList<student>();        public static void alphabeticalSort(){    	student[] tempArray = new student[studentTracker.size()];    	for(int i=0;i<studentTracker.size();i++){    		tempArray[i] = studentTracker.get(i);    		//tempArray[i].displayInfo();    		    	}    	for (int i=0;i<tempArray.length-1;i++){    		//if (tempArray[i].showLastName()){    		// Convert All to Upper then Compare ASCII values, Flipping Values Individually     		// By Repeating the sorting process for the upper bounds of the array.	    		//}    	}    		    }        public static void main(String args[]) {    	student tempReader;    	studentTracker.add(0,new student("HURR","BOTCH",66622666));    	studentTracker.add(1,new student("Cecconet", "Michael", 12943413));    	studentTracker.add(2,new student("Tennocec", "Leahcim", 31434921));    	studentTracker.add(3,new student("Simon", "Joshua", 23443413));    	studentTracker.add(4,new student("Defilipis", "Joe", 24523417));    	studentTracker.add(5,new student("Caia", "Gaspare", 32424123));    	studentTracker.add(6,new student("Test", "Test", 22222222));    	studentTracker.add(7,new student("Kitty", "Hello", 24234234));    	studentTracker.add(8,new student("Rocketfingers", "Johnny", 32424123));    	studentTracker.add(9,new student("Salad", "Tasty", 24324243));    	studentTracker.add(10,new student("Seafood", "Fresh", 86846354));    	studentTracker.add(11,new student("Pasta", "Steaming", 34324676));    	    	alphabeticalSort();    	    	for(int i=0;i<studentTracker.size();i++){    		tempReader = studentTracker.get(i);    		tempReader.displayAll();    	}    }        }