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 4: TEMA 2 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 void Q4 () { $1; while (C1) { } } if (C2 && C3){ S2; } else if (C4 && C5){ S3; } else { $4; } while (C6 && C7) { S5; if (C8) { $8; } else { $6; while (C9) { S7; } For P*, assume that the while loops (Lines 3, respectively. and 19) are executed exactly 3, 2, and 3 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 4: TEMA 2 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 void Q4 () { $1; while (C1) { } } if (C2 && C3){ S2; } else if (C4 && C5){ S3; } else { $4; } while (C6 && C7) { S5; if (C8) { $8; } else { $6; while (C9) { S7; } For P*, assume that the while loops (Lines 3, respectively. and 19) are executed exactly 3, 2, and 3 times