45
5
6
7
8
9
10
11
12
13
14
15
16
17
18
boolean found;
if(ar1 != null && ar2 != null) {
Output = new ArrayList<Integer>();
for(int item: ar1){
int i;
found = false;
System.out.println(found);
while(i <= ar2.length && found == false) {
if(item== ar2[i])
found = true;
i++;
}
if (found)
Output.add(item);
}
19 }
20
return Output;
21 }
Question 2 (3 points): Assuming you are assigned to conduct the component test for the method below, please design and create the minimum component test cases (Unit Test case) needed to achieve 100% statement coverage and 100% decision coverage. (Use question 2 template).
100%
Zoom
Close