Page 209 - DCAP405_SOFTWARE_ENGINEERING
P. 209
Software Engineering
Notes
Figure 12.3 (A)
2. Determine the cyclomatic complexity of the resultant flow graph. The cyclomatic
complexity, V(G), is determined. It should be noted that V(G) can be determined without
developing a flow graph by counting all conditional statements in the PDL (for the
procedure average, compound conditions count as two) and adding 1. Referring to
Figure 12.3 (B),
V(G) = 6 regions
V(G) = 17 edges – 13 nodes + 2 = 6
V(G) = 5 predicate nodes + 1 = 6
Figure 12.3 (B)
202 LOVELY PROFESSIONAL UNIVERSITY