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:35 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 3: H2 10 11 12 13 14 15 16 17 18 19 20 21 22 23 void Q2() { $1; if (C1 && C2 ) { $2; } } else { } if (CS) { } else { for (S3; C3; S4) { $5; if (C4) { } $11; } } for (S7; C6; S8 ) { 59; $10; $6; For P, assume that the for loop (Line 7) may be executed anywhere from 0 to 4 times, the for loop (Line 15) is executed exactly 2 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 3: H2 10 11 12 13 14 15 16 17 18 19 20 21 22 23 void Q2() { $1; if (C1 && C2 ) { $2; } } else { } if (CS) { } else { for (S3; C3; S4) { $5; if (C4) { } $11; } } for (S7; C6; S8 ) { 59; $10; $6; For P, assume that the for loop (Line 7) may be executed anywhere from 0 to 4 times, the for loop (Line 15) is executed exactly 2 times.