Determine the cyclomatic complexity, Software Engineering

Assignment Help:

Q. Consider the program given below

void main()

{

int i,j,k;

readln (i,j,k);

if( (i < j) || ( i > k) )

{

writeln("then part");

if (j < k)

writeln ("j less then k");

else writeln ( " j not less then k");

}

else writeln( "else Part"); }

(i) Draw the flow graph. (4)

(ii) Determine the cyclomatic complexity. (4)

(iii) Arrive at all the independent paths. (8)

 

 

Ans:

void main()

{

int i,j,k;

readln (i,j,k);

if( (i < j) || ( i > k) )

{

writeln("then part");

if (j < k)

writeln ("j less then k");

else writeln ( " j not less then k");

}

else writeln( "else Part");

}

206_Determine the cyclomatic complexity.png

(ii) Cyclomatic complexity = E - N + 2 = 12 - 10 + 2 = 4

(iii) The four independent paths are

Path1 : 1 2 3 9 10

Path2 : 1 2 4 5 7 8 10

Path3 : 1 2 4 5 6 8 10

Path4 : 1 2 3 4 5 7 8 10


Related Discussions:- Determine the cyclomatic complexity

What is function point, What is function point? Function point is the s...

What is function point? Function point is the size of measure it is also used to calculate approximately the software cost. Function point (FP)=Function Count (FC) * Value a

Explain throw-away prototyping, Throw-Away Prototyping: Also known as clos...

Throw-Away Prototyping: Also known as close ended prototyping. Throwaway or Rapid Prototyping refers to the formation of a model that will eventually be discarded rather than beco

What is dynamic analysis, The process of evaluating a program based on impl...

The process of evaluating a program based on implementation of that program. Dynamic analysis approaches rely on implementing a piece of software with selected test data.

What is syntax, 1) The relationship between characters or groups of charact...

1) The relationship between characters or groups of characters independent of their meanings or the manner of their interpretation and use; 2) The formation of expressions in a

Explain about spiral model, Q. Explain about Spiral Model? The Spiral m...

Q. Explain about Spiral Model? The Spiral model is one of the well-liked model used for large projects. This model was projected by Boehm in 1988 and it focuses on minimizing t

What are the causes behind to perform white box testing, What are the cause...

What are the causes behind to perform white box testing? There are three main reasons behind performing the white box testing. 1. Programmers may have some incorrect assumpt

What are the phases of problem solving loop, What are the phases of Problem...

What are the phases of Problem solving Loop? Problem definition identifies the problem to be resolved. Technical development helps to resolve the Problem through various Te

What is cocomo, Problem 1. Explain different roles of the software deve...

Problem 1. Explain different roles of the software development? 2. What is conflict management? Explain various causes for conflict 3. What is COCOMO? Explain COCOMO mode

Outsourcing, Discuss how your own organization can take advantage of outsou...

Discuss how your own organization can take advantage of outsourcing its IT systems/functions. In your discussion state what can be outsourced and what benefit will be gained. Do yo

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd