Determine the cyclomatic complexity, Software Engineering

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

Posted Date: 7/26/2013 4:02:20 AM | Location : United States







Related Discussions:- Determine the cyclomatic complexity, Assignment Help, Ask Question on Determine the cyclomatic complexity, Get Answer, Expert's Help, Determine the cyclomatic complexity Discussions

Write discussion on Determine the cyclomatic complexity
Your posts are moderated
Related Questions
i need solution manual for software engineering |10 edition by ian Sommerville

What are the task involved in design process of SDLC General tasks involved in the design process are the following: i)  Design various blocks for overall system processes.

Determine the process of software Coding The input to coding phase is the SDD document. In this stage, design document is coded according to module specification. This phase t

Features of Cds - isis software: Main Features The main features of CDS/ISIS software may briefly be summarised as follows:   the handling of variable length records, fi

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


Testing to satisfy the criterion that every statement in a program be implemented at least once during program testing.

Advantages of incremental Model:- As product is to be delivered in parts, total cost of the project is dispersed. Limited number of persons can be put on to the projec

Static testing tools: 1. Static analysers   2. Code inspectors  3. Standard Dynamic testing tools   1. Coverage analyzers (execution verifiers)    2. Output co

Software Project Management 1. What is black box and white box testing techniques? 2. Describe different roles of the software development? 3. List out different project