Question: 1 void Q40 2 3 4 5 6 7 8 9 10 S1; while(C1) S2 while(C2)t S3; while(C3) S4 if(C4)H S5; else 12 13 14


1 void Q40 2 3 4 5 6 7 8 9 10 S1; while(C1) S2 while(C2)t S3; while(C3) S4 if(C4)H S5; else 12 13 14 15 16 17 18 19 S7 For P, suppose the while loops defined by lines 3, 5, and 7 are executed exactly 1, 2, and 3 times respectively (15 pts) 1. Draw the program graph. You must use line numbers to label all nodes in the graph. Do not use the statements or statement fragments themselves as nodes labels. (5 pts) 2. Compute the cyclomatic number using each of the three methods discussed in class. Show your work. (5 pts) 3. Calculate the P* using the given conditions under each problem. Show your work. 1 void Q40 2 3 4 5 6 7 8 9 10 S1; while(C1) S2 while(C2)t S3; while(C3) S4 if(C4)H S5; else 12 13 14 15 16 17 18 19 S7 For P, suppose the while loops defined by lines 3, 5, and 7 are executed exactly 1, 2, and 3 times respectively (15 pts) 1. Draw the program graph. You must use line numbers to label all nodes in the graph. Do not use the statements or statement fragments themselves as nodes labels. (5 pts) 2. Compute the cyclomatic number using each of the three methods discussed in class. Show your work. (5 pts) 3. Calculate the P* using the given conditions under each problem. Show your work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
