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 are the drawbacks of rad model, Mention some of the drawbacks of RAD m...

Mention some of the drawbacks of RAD model. Unuseful for a large-scale projects. Interest of developers & customers are necessary. Not useful and perfect when technica

What is benchmark, What is Benchmark? Ans) A Benchmark is a standard to ...

What is Benchmark? Ans) A Benchmark is a standard to calculate against.

Fan out Fan In, Explain fan out and fan in with example.

Explain fan out and fan in with example.

Define requirement engineering, Define Requirement Engineering. Require...

Define Requirement Engineering. Requirement Engineering is a process that includes all of the activities needed to create and maintain a system requirements document. The fo

Software engineering, Software Engineering A  high technology system e...

Software Engineering A  high technology system encompasses a  number of  elements like   people, hardware, software, database, documentation, and process.  System engineering

State the process of white box testing, State the process of White box test...

State the process of White box testing White box testing:   This method, also termed as glass box testing, is performed early in testing process.  By using this, software engi

Explain scm, What is SCM? Software Configuration Management is a set of...

What is SCM? Software Configuration Management is a set of activities carried out for identifying, organizing and controlling alters throughout the lifecycle of computer softwa

Describe structure-based testing techniques, Describe Structure-based testi...

Describe Structure-based testing techniques - Structure-based testing techniques are also known as white-box testing techniques. - They use internal structure of the softwar

What is e-commerce, Question 1 What do you mean by system's state of equil...

Question 1 What do you mean by system's state of equilibrium? Also illustrate the process of stabilising system Question 2 Explain the concept of Planning and Design in syste

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