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 is the work product of software design process, What is the work produ...

What is the work product of software design process and who does this? A design model that encompasses architectural, interface, component level and their representations is th

What is evolutionary prototype, Evolutionary Prototype In this, prot...

Evolutionary Prototype In this, prototype is constructed to learn about software problems and their solutions in successive steps. Prototype is initially developed to satisf

What is vdd, What is VDD Ans) VDD- "version description document".

What is VDD Ans) VDD- "version description document".

State about the normal data - Test data, State about the Normal data- Test...

State about the Normal data- Test data -  This is data which is valid/acceptable and has expected outcomes (for instance, if a date is being input the day must be in the rang

What do you mean by class, Q. What do you mean by class? A class is a t...

Q. What do you mean by class? A class is a template that specifies the properties of objects. Classes have an interface that consists of the operation a body which implements t

Explain productivity and difficulty, Productivity and difficulty Produ...

Productivity and difficulty Productivity refers to metrics and measures of output from production processes, per unit of input. Productivity P may be conceived of as a metric

Write down short notes on empirical estimation models, Write down short not...

Write down short notes on empirical estimation models ?

Explain scalability of information systems, Question: (a) The relations...

Question: (a) The relationship between organisations and information technology is a complex one, and is made up of a number of mediating factors which must be considered prior

Explain about communicational cohesion, Q. Explain about Communicational co...

Q. Explain about Communicational cohesion? Communicational cohesion: The Communicational cohesion is when parts of a module are grouped for the reason that they operate on th

Software design improve when we use object-oriented concept, Why does the ...

Why does the software design improve when  we use object-oriented concepts?    The software design improves when we use object-oriented concepts because 1. Object-orientatio

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