Limited access

Upgrade to access all content for this subject

Consider the following method signature.

/** find average GPA of sophomore AP Calc students at high school
 * @param students array list of all AP Calc students at school
 * @return avgGPA average GPA of sophomores
 */
public static double getAvgGPA(ArrayList students)
{
     // code not shown
}

If you could only choose four of these test scenarios, which four would you choose to thoroughly test the method?

I. Call the method with a list of a mixture of juniors and seniors.
II. Call the method with a list of one student who is a sophomore.
III. Call the method with a list of 5 students who are all sophomores.
IV. Call the method with a list that contains no students.
V. Call the method with a list that contains a mixture of sophomores, juniors, and seniors.

A

I, II, III, IV.

B

II, III, IV, V.

C

I, III, IV, V.

D

Only three of these choices are valid.

E

None of these choices are valid.

Select an assignment template