Write a test plan to test the method in the previous problem.

What will be an ideal response?

There are four obvious test cases:
Test Case 1: The second largest value is in the first position (index 0).
Test Case 2: The second largest value is in the last position (index n - 1).
Test Case 3: The second largest value is in the interior of the array (index n / 2).
Test Case 4: There is a duplicate of the second largest value.

Computer Science & Information Technology

You might also like to view...

Data that is displayed in a cell is called the underlying value

Indicate whether the statement is true or false

Computer Science & Information Technology

Which clause can be entered anywhere within a switch statement, but is usually coded as the last clause in the switch statement?

A. dropout B. exit C. loop D. default

Computer Science & Information Technology