Consider the following method :

int f(int m, int n, boolean x, boolean y)

{

int res=0;

if(m<0) {res=n-m;}

else if(x || y) {

res= -1;

if(n==m) {res =1;}

}

else {res=n;}

return res;

} /*end of f */

If P is the minimum number of tests to achieve full statement coverage for f() and Q is the minimum number of tests to achieve full branch coverage for f(), then (P, Q) =

1
(3, 4)
2
(3, 2)
3
(2, 3)
4
(4, 3)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation