1. (15 points) Draw the program graph. You must use line numbers to label all nodes in the graph. Do not use the stateme
Posted: Fri Jul 01, 2022 5:41 am
statement fragments themselves as labels. 2. (5 points) Compute the cyclomatic number using each of the three methods discussed in the lectures. Show your work. 3. (5 points) Calculate P* using the given conditions for each problem. Show your work.
Problem 2: 1 2 3 4 5 6 7 8 9 10 1234513013 16 17 18 void Q2() { S1; 19 20 21 22 23 24 25 } if (C1) { } else } $9; { for (S2; C2; S3) { } } else { if (C3 && C4 ) { $4; } } else { } if (C5 && C6 ) { S6; If (C7) { } $5; S8; S7; For P*, assume that the for loop (line 4) executes exactly 4 times.
1. (15 points) Draw the program graph. You must use line numbers to label all nodes in the graph. Do not use the statements or Problem 2: 1 2 3 4 5 6 7 8 9 10 1234513013 16 17 18 void Q2() { S1; 19 20 21 22 23 24 25 } if (C1) { } else } $9; { for (S2; C2; S3) { } } else { if (C3 && C4 ) { $4; } } else { } if (C5 && C6 ) { S6; If (C7) { } $5; S8; S7; For P*, assume that the for loop (line 4) executes exactly 4 times.