What is Cyclomatic Complexity? Explain it with example?

Showing Answers 1 - 6 of 6 Answers

Shahwar

  • Feb 1st, 2006
 

Cyclo complexity is a measure of the number of linearly independent paths through a program module. It is a measure of complexity of code related to the number of ways there are to traverse to piece of code. This determines the minimum number of inputs you need to test all ways to execute the program.

  Was this answer useful?  Yes

T.M.KHAN

  • Feb 7th, 2006
 

My dear, your answer is correct but please explain Cyclomatic Complexity with the help of an example.

  Was this answer useful?  Yes

divya

  • Mar 11th, 2006
 

yes, i know the definition u gave here but could you please explain with an example

  Was this answer useful?  Yes

sindhaval

  • Mar 17th, 2006
 

I tried to explain with example, but i cudn't so i suggest plz refer the pressman book for this ,in that he explained with an example.

  Was this answer useful?  Yes

Deepa Ramalingam

  • Jun 15th, 2006
 

Cyclomatic complexity is related to the number of decisions in a program or control flow graph. The easiest way to compute it is to count the number of decisions (diamond-shaped boxes) on a control flow graph and add 1. Working from code, count the total number of IF?s and any loop constructs (DO, FOR, WHILE, REPEAT) and add 1. The cyclomatic complexity does reflect to some extent how complex a code fragment is.

  Was this answer useful?  Yes

nil

  • Jun 19th, 2006
 

suppose in an 'if' statement your checking the path. you will have to check( ex. a>b) here you will check a greater then b what will nhappen, as wel as a less then b what will happen. you will have to check all the path.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions