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

Encapsulation, Illustrate the use of the concept Encapsulation.

Illustrate the use of the concept Encapsulation.

Explain the seven model primitives in 3d lingo, (a) Copying a graphic imag...

(a) Copying a graphic image from the Web can be as easy as pointing to it and clicking the right mouse button or performing a screen capture. The question is, under what circumsta

What is software maintenance, What is software maintenance? Changes to...

What is software maintenance? Changes to the software are made in response to altered requirements but the fundamental structure of the software remains stable.

Iterative enhancement model, Iterative Enhancement Model Iterative Enha...

Iterative Enhancement Model Iterative Enhancement Model: This model has the similar phases as the waterfall model, but with fewer restrictions. Normally the phases happen in th

Explain about function count - software metrics, Q. Explain about Function ...

Q. Explain about Function count? Function count:- It measures the functionality from the user point of view that is on the basis of what the user requests and receives in ret

Write about the types of project plan, Write about the types of project pla...

Write about the types of project plan. Quality plan - This plan explains the quality procedures and standards that will be used in a project. Validation plan - This plan explai

Give explanation about the incremental model, Give explanation about the in...

Give explanation about the incremental model. - Have same phases as the waterfall model. - Phases are as follows: Analysis. Code. Design. Test. Incre

Define the term - case, What is CASE? CASE tool stands for Computer Aid...

What is CASE? CASE tool stands for Computer Aided Software Engineering. Computer Aided Software Engineering tools helps software engineering manages and practitioners in every

State the software measure, What is software measure? A software measu...

What is software measure? A software measure is a mapping from a set of objects in the software engineering world information a set of mathematical construct like numbers or v

Software metrics, what is halstead software science measures

what is halstead software science measures

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