import java.util.Random; /** * This class investigates the behavior of the search methods in Searches. */ public class SearchTester { /** * This method creates and returns an array of ints of the specified size. It * ensures that the values in the array are in increasing order, yet random, by * remembering the last value added to the array and adding a random int to that * value to produce the next each time. * * @param size The length of the array to be created * @return An ordered array of integers of the specified size */ public int[] buildOrderedArray(int size) { int[] nums = new int[size]; // Create the array we're going to fill Random rng = new Random(); int next = 0; // Stores prevous value added to array for(int i=0; i