//******************************************************************** // SortGrades.java Author: Lewis and Loftus // // Driver per fare un test di ordinamento per selezione su un insieme di numeri interi. //******************************************************************** import Sorts; public class SortGrades { //----------------------------------------------------------------- // Crea un array di numeri, li ordina e li stampa. //----------------------------------------------------------------- public static void main (String[] args) { int[] numeri = {89, 94, 69, 80, 97, 85, 73, 91, 77, 85, 93}; // stampa i numeri con cui si è inizializzato l'array for (int indice = 0; indice < numeri.length; indice++) System.out.print (numeri[indice] + " "); System.out.println (); Sorts.selectionSort (numeri); for (int indice = 0; indice < numeri.length; indice++) System.out.print (numeri[indice] + " "); System.out.println (); } }