Compare the complexities of the following two pieces of code using the cyclomatic complexity metrics. What conclusions
Fantastic news! We've Found the answer you've been seeking!
Question:
Compare the complexities of the following two pieces of code using the cyclomatic complexity metrics. What conclusions can you draw about relative complexity of the code?
Code A
int i = 1;
while (i <= 5) {
Playacard(i);
if (playhaswon(i))
i++;
else
i--;
i++;
}
Code B
int j = 1;
int i = 2;
if (j =i);
j++;
else
i++;
System.out.println(j);
Related Book For
Posted Date: