import java.util.*; import java.util.Random.*; /** * Lab 1 * author: John Sloan) * version: 01-11-2009 */ public class TestRandom { //instance class variable private int [ ] a; /** * This constructor defines the size and range through its parameter. Each place in the index * of the array is assigned a random value */ public TestRandom( int size, int max ) { Random random = new Random (); a = new int[size]; for(int i = 0; i < size; i++) { a[i] = random.nextInt(max); //see library } } /** * Print random array values line by line beginning at index 0. */ int index=0; public void printArray () { for(int i=0; i0) { count = 0; } for(b=0; baround -2) { System.out.println ("A[" + i + "]" + " =" + a[i]); } } } }