DAT305 University of Phoenix CH3? Data Structures Testing and Debugging HW
Complete the Exercises for Section 3.5, Programming #1, in Ch. 3, “Testing and Debugging”, of Data Structures: Abstraction and Design Using Java.
Section 3.5, Programming #1, in Ch. 3. Write the findLargest
method described in self-check exercise 2 in section 3.4 using Test Driven Development.
elf-check exercise 2 in section 3.4 List the boundary conditions and tests needed for a method with the following heading:
/**
* Search an array to find the first occurrence of the
* largest element
* @param x Array to search
* @return The subscript of the first occurrence of the
* largest element
* @throws NullPointerException if x is null
*/
public static int findLargest(int[] x) {