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 the tools of environmental model, What are the Tools of environme...

What are the Tools of environmental  model (i)  Statement of purpose: It indicates basic objectives of system. (ii)  Event list: It describes different events of system

The phases of a problem solving loop, Problem solving is a critical skill f...

Problem solving is a critical skill for success in business—in fact it’s often what you are hired and paid to do. This article explains the five problem solving steps and provides

Explain about the software testing strategies, Explain about the software t...

Explain about the software testing strategies. A method approach to software testing. Verification and Validation. Verification refers to the set of activities tha

Srs, Why is SRS document known as black box specification of a system

Why is SRS document known as black box specification of a system

The software life cycle model that incorporates risk factor, Explain the so...

Explain the software life cycle model that incorporates risk factor.  The problem with traditional software process models is that they do not deal adequately with the uncertai

Explain big-bang testing, Big-Bang Testing : In this all the modules after ...

Big-Bang Testing : In this all the modules after unit testing are joint and tested in one go. The problem with this type of testing is debugging of errors.

Software engineering, Software Engineering A  high technology system e...

Software Engineering A  high technology system encompasses a  number of  elements like   people, hardware, software, database, documentation, and process.  System engineering

Illustrate evolutionary prototyping, Illustrate Evolutionary prototyping ...

Illustrate Evolutionary prototyping Objective: The main objective of this model is to show the working system to the end-user. Example-AI systems. Advantages

Describe component testing, Describe component testing. - Component tes...

Describe component testing. - Component testing is also called as module, unit or program testing. - It looks for defects in software and verifies its functioning. - It c

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