Q5 Cyclomatic Complexity A flow graph F with entry node 1 and exit node 11 is shown below: How many nodes are there in flow graph F? What is the cyclomatic complexity of the integrated module M? The value of n is. The latest release require that 90 of these modules be changed. In addition, 40 new modules were added and 12 old modules were removed. Compute the software maturity index for the system. Cyclomatic Complexity Question Ask Question.
Asked 3 years, 10 months ago. Active 3 years, 10 months ago. Viewed times. Is my calculation correct? Improve this question. Al-geBra Al-geBra 47 1 1 bronze badge.
This looks suspiciously like a homework problem. Beefster Even if it is, they did the work and are asking for feedback rather than asking for the answer. That seems acceptable to me. This falls under "methods and practices" as described in the help. I tried. Add a comment. Active Oldest Votes. Improve this answer. Of course, for calculating cyclomatic complexity in a structured language like Java, there's a much easier way: start with 1, then read the code line by line, adding 1 each time you see a condition with a branching point including, as you point out, shortcircuiting boolean operators.
I believe this approach may fail in the presence of "goto" statements, but for Java programs it should always work. Jules That counts branch points, but not paths. Early returns and loop controls such as break or continue complicate everything.
At most one loop per function! Mathematically, for a structured program, the directed graph inside control flow is the edge joining two basic blocks of the program as control may pass from first to second. Skip to content. Change Language. Related Articles. Table of Contents. Improve Article. Save Article. Like Article.
0コメント