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

Define design process, Define design process. Design process is a sequ...

Define design process. Design process is a sequence of steps carried through which the requirements are translated into a system or software model.

Designing website, I have to make assets for the design that i have done fo...

I have to make assets for the design that i have done for the website but i dont know how to do it can you please help me?

Realistic approach to the development of large-scale systems, Q. Realistic ...

Q. Realistic approach to the development of large-scale systems? There are a number of advantages of Spiral model that makes it a realistic approach to development of large-sca

Iterative Enhancement Model, what is the advantage of Iterative Enhancement...

what is the advantage of Iterative Enhancement Model in developing a system?

Explain the important characteristics of a dmz, Question: a) A firewall...

Question: a) A firewall will be classified according to which layer of the OSI model the protection is at. Using this classification, explain the different types of firewalls.

Information engineering, Information engineering is a system  engineering ...

Information engineering is a system  engineering approach which is used to describe architectures which enable a business to use data professionally. The intent of information eng

Explain rad model, RAD Model Rapid Application Development Model is...

RAD Model Rapid Application Development Model is the part of incremental model. Achieves the high speed development using component based construction. Phases

Explain about the incremental model, Explain about the incremental model. ...

Explain about the incremental model. Have same phases as the waterfall model. Phases are Analysis. Design. Code. Test. Incremental model deliver

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