What is cyclomatic complexity and why is it important?
Answer Posted / sheetal
What is cyclomatic complexity
Cyclomatic complexity is a computer science metric
(measurement) developed by Thomas McCabe used to generally
measure the complexity of a program. It directly measures
the number of linearly independent paths through a programs
source code.
The concept, although not the method, is somewhat similar to
that of general text complexity measured by the
Flesch-Kincaid Readability Test.
Cyclomatic complexity is computed using a graph that
describes the control flow of the program. The nodes of the
graph correspond to the commands of a program. A directed
edge connects two nodes, if the second command might be
executed immediately after the first
command. By definition,
CC = E - N + P
where
CC = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Why is an object pool required?
I have an external link in my application say www.xyztest.com. Today this site works on http protocal. Tommorow it may run on https. So i cant hardcore the protocal in the site. When a user clicks on the link how can i know if the external site works on http or https and takes him to that place?
What is application session?
What is considered a service provider?
What is the benefit of WebAPI over WCF?
How do I open an ashx file in windows 7?
What are main return types supported in Web API?
What are session state modes in asp.net?
Give me one example of Web API Routing?
What is the use of session state and application state and difference between them?
What is the use of response redirect in asp.net?
Why asp.net is used?
What is the life-span of the items in the viewstate?
Explain how viewstate is being formed?
What is the main difference between Asp.net and Vb.net?