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 quality reviews, What are Quality reviews? This is the princip...

What are Quality reviews? This is the principal method of validating the quality of a process or of a product. A group examines part or all of a process or system and its do

RMMM Planner, Give a complete example that how to tackle with it.

Give a complete example that how to tackle with it.

State the term software is engineered, Justify the term "Software is engine...

Justify the term "Software is engineered" Software is engineered not manufactured. Although some similarities exist between software development and hardware manufacture, the t

Project tracking, project tracking and overview of project process?

project tracking and overview of project process?

State the testing and debugging, State the Testing and Debugging Testin...

State the Testing and Debugging Testing is process of verifying if the application matches needs and reporting bugs; Testing is usually done by an independent testing team wher

What is the purpose of timeline chart, What is the purpose of timeline char...

What is the purpose of timeline chart? The purpose of the timeline chart is to emphasize the scope of the individual task. As set of tasks are given as input to the timeline ch

Cyclomatic complexity for a data flow diagram, pls explain how to calculate...

pls explain how to calculatethe cyclomatic complexity and independent paths Determine the cyclomatic complexity of the code ( (iii) Identify all the independent paths

What is relationship, What is Relationship Entities are associated t...

What is Relationship Entities are associated to each other by relationships. It denotes how two entities are associated. A diamond notation with name of relationship signifi

Explain smoke testing, Smoke testing It decreases the integration risk....

Smoke testing It decreases the integration risk. Error diagnosis and correction are simplified

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