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

Explain path testing, Testing to satisfy coverage criteria that every logic...

Testing to satisfy coverage criteria that every logical path by the program be tested. Often paths by the program are grouped into a finite set of classes. Single path from every c

How messages can be used in software engineering, Q. How Messages can be us...

Q. How Messages can be used in software engineering? Messages:- The interaction or communication between the different objects and classes is done by passing messages. The ob

The functional requirement for a library management system, Describe the fu...

Describe the functional requirement for a Library management system ?

what is qualification testing, Formal testing, usually conducted by the de...

Formal testing, usually conducted by the developer for the consumer, to demonstrate that the software meet its described requirements.

Which is not the purpose of full annealing, Which is not the purpose of ful...

Which is not the purpose of full annealing Produces hardest material.

Evaluate the agresti-card-glass metrics, Question 1: We have a small sy...

Question 1: We have a small system with a call graph as given below. Consider that each vertex is a module. All modules are new (i.e., n = n0) Also consider that the number of

Draw an entity relationship diagram, Problem: (a) Draw an Entity Relat...

Problem: (a) Draw an Entity Relationship Diagram for the given case study. Show entities and relationships on the diagram (attributes should not be shown). Cardinality and op

Describe various types of cohesion, Describe various types of Cohesion? ...

Describe various types of Cohesion? i. Coincidentally cohesive -The modules in which the set I\of tasks are linked with each other loosely then these modules are called coincid

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

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