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 the process of black box testing, Explain the process of Black box ...

Explain the process of Black box testing  This is applied during the later stage of testing.  It enables software developer to derive a set of input conditions which will fully

Creating the field selection table - database definition, Creating the Fiel...

Creating the Field Selection Table (FST) : Entering of data and creating indexes for searching is a very important feature associated with any information storage and retriev

Compare CMM with ISO 9001, Q. Compare CMM with ISO 9001 ? 1: Managemen...

Q. Compare CMM with ISO 9001 ? 1: Management responsibility: ISO 9001 needs that the quality policy be defined and documented and understood as well implemented and maintaine

Com 101p, Peripheral devices are irrelevant to the computer

Peripheral devices are irrelevant to the computer

Calculate the peak manning time, Q. Consider a project for which the manpow...

Q. Consider a project for which the manpower requirement is 200 PY and the development time is 2 years. calculate the peak manning time. Ans Software Project cost K=200 PY

Reverse engineering, explain the effect of reverse engineering of software ...

explain the effect of reverse engineering of software development #

Script file, how to make script file volume of pyramid

how to make script file volume of pyramid

What is walkthrough, What is Walkthrough? Ans) Usually, a step-by-step s...

What is Walkthrough? Ans) Usually, a step-by-step simulation of the implementation of a procedure, as when walking by code, line by line, with an imagined set of inputs. The wor

Assignment 2, I have to do an assignment. Can you help me to do it

I have to do an assignment. Can you help me to do it

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