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

How many types of project plan, How many types of project plan. Quality...

How many types of project plan. Quality plan - This plan describes the quality techniques and standards that will be used in a project. Validation plan - This plan explains the

What is structured programming and why is it important, What is structured ...

What is structured programming and why is it important? Structured programming is a programming which was coined in the late 1960's to mean programming without using go to stat

Explain the term- system maintenance, Explain the term- System Maintenance ...

Explain the term- System Maintenance update hardware as new items come on market or company changes in any way which requires new devices to be updated/added Update sof

Name the techniques used in behavioural model, Name the techniques used in ...

Name the techniques used in behavioural model In conventional approach of modeling, analyst collects great deal of comparatively unstructured data through data gathering tools

Explain iterative enhancement model, Explain Iterative Enhancement model ...

Explain Iterative Enhancement model Iterative Enhancement model: This model incorporates alters in the software based on the analysis of the existing system. Also the complet

implicit and explicit conceptual model, difference between implicit and ex...

difference between implicit and explicit conceptual model

Clue-less system, The Clue-Less system is a software version of the popular...

The Clue-Less system is a software version of the popular board game Clue. The rules of Clue-Less mirror those of Clue, with the exception of a modified navigation scheme. The soft

Object oriented concepts used in software engineering, Explain various Obje...

Explain various Object Oriented concepts used in Software Engineering. The concepts of Object Oriented concepts used in Softwar Engineering: Object Class:- Enc

What is a boundary value analysis, What is a boundary value analysis? A...

What is a boundary value analysis? A boundary value analysis is a testing method in which the elements at the edge of the domain are selected and tested. It is a test case desi

What is waterfall model, Waterfall is a model of the software development p...

Waterfall is a model of the software development process in which the idea phase, requirements phase, design phase, execution phase, test phase, installation phase, and checkout ph

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