Based on the control flow graph find the cyclomatic


Read the following Java code fragment for a method which attempts to calculate the number of students having the mark between 1 and 4.

ns = 0;

I = 0;

while (I <= N) {

if (mark[I] >= 1.0 && mark[I] < 4.0)

ns++;

I++;

}

print ns;

(i) Draw a control flow graph.

(ii) Based on the control flow graph, find the cyclomatic complexity and list all the (linearly) independent paths.

(iii) Prepare a test case for each independent path.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Based on the control flow graph find the cyclomatic
Reference No:- TGS02912372

Expected delivery within 24 Hours