?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Difficult

Test Scenarios for Removing Elements from an ArrayList

APCSA-GPEFXW

You are asked to test a method that removes all "giraffe" elements from an array list of zoo animals. Without knowing any more about this method, you create the single test scenario below:

["lion", "tiger","zebra", "giraffe", "elephant"]

However, you suspect this single test scenario is inadequate. If you could only pick four more test scenarios from the list below, which would you select?

I.   ["lion", "tiger", "giraffe", "giraffe", "elephant"]
II.  ["giraffe", "tiger", "zebra", "giraffe", "elephant"]
III. ["lion", "tiger", "zebra", "antelope", "giraffe"]
IV.  ["lion", "giraffe", "zebra", "tiger", "elephant"]
V.   ["lion", "tiger", "zebra", "elephant"]
A

I, II, III, IV

B

I, II, III, V

C

I, II, IV, V

D

I, III, IV, V

E

II, III, IV, V