Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem Descriptions: The purpose of this assignment is to reinforce the material on program graphs from lecture. For each of the four problems below: (15
Problem Descriptions: The purpose of this assignment is to reinforce the material on program graphs from lecture. For each of the four problems below: (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. Hint: 1 1 if (C1 && C2) 2 S1; 3 else 4 S2; For the program slice above, the program graph should be drawn as below: 11 T 12 govore Problem 4: 1 2 3 4 5 6 7 8 9 10 11 void Q40){ S1; while(C1){ if(C2 && C3){ S2; } else{ S3; } while(C4){ S4; if(C5&C6){ S5; } while(C7}{ S6; } } Sz; } 58; } 12 13 14 15 16 17 18 19 20 21 22 For P*, suppose the while loop in line 3, 10, and 15 are executed exactly 2, 2, and 3 times
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started