edited by
10,973 views
2 votes
2 votes

Which one of the following statements is incorrect?

  1. The number of regions corresponds to the cyclomatic complexity
  2. Cyclomatic complexity for a flow graph $G$ is $V(G)=N-E+2$, where E is the number of edges and N is the number of nodes in flow graph.
  3. Cyclomatic complexity for a flow graph $G$ is $V(G)=E-N+2$, where E is the number of edges and N is the number of nodes in flow graph.
  4. Cyclomatic complexity for a flow graph $G$ is $V(G)=P+1$, where P is the number of predicate nodes contained in the flow graph G.
edited by

3 Answers

Best answer
10 votes
10 votes

Answer : Cyclomatic complexity for a flow graph G is V(G)=E-N+2, where E is the number of edges and N is the number of nodes in flow graph.

Cyclomatic complexity is a software metric (measurement), used to indicate the complexity of a program

Cyclomatic complexity = E - N + P 
where,
  E = number of edges in the flow graph.
  N = number of nodes in the flow graph.
  P = number of nodes that have exit points

Reference : Cyclomatic Complexity

edited by
1 votes
1 votes

A. IS CORRECT COZ CP=# OF REGIONS OR # OF CLOSED REGIONS + 1

B IS INCORRECT....

C. IS CORRECT AS IT IS THE EASY WAY TO CALCULATE IF EDGE, NODES ARE GIVEN

D. IS CORRECT COZ CP =# OF DECISION STATEMENTS + 1 OR # OF PREDICATE NODES + 1

Answer:

Related questions

5.5k
views
1 answers
4 votes
go_editor asked Aug 20, 2016
5,473 views
The number of function points of a proposed system is calculated as 500. Suppose that the system is planned to be developed in Java and the LOC/FP ... and 1.0 respectively25 person months75 person months62.5 person months72.5 person months
1.5k
views
1 answers
1 votes
go_editor asked Jul 7, 2016
1,527 views
Are we building the right product? – This statement refers toVerificationValidationTestingSoftware quality assurance
6.9k
views
2 answers
2 votes
go_editor asked Jul 7, 2016
6,925 views
While unit testing a module, it is found that for a set of test data, maximum 90% of the code alone were tested with a probability of success 0.9. The reliability ... module isat least greater than 0.9equal to 0.9at most 0.81at least 1/0.81
2.5k
views
2 answers
1 votes
makhdoom ghaya asked Jul 23, 2016
2,502 views
Which one of the following set of attributes should not be encompassed by effective software metrics ? Simple and computableConsistent and objectiveConsistent in the use of units and dimensionsProgramming language dependent