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 activities of software maintenance, Q. Explain activities of softwa...

Q. Explain activities of software maintenance? The Software maintenance is a broad activity that includes enhancement of capabilities, error correction, deletion of obsolete ca

What is common coupling, Q. What is Common coupling? Common coupling: ...

Q. What is Common coupling? Common coupling: With general coupling module A and module B have shared data. Global data areas are usually found in programming languages. Formu

What is the full form of eva, What is EVA? Earned Value Analysis is a ...

What is EVA? Earned Value Analysis is a technique of performing quantitative analysis of the software project. It gives a common value scale for each task of software projec

State the technique pilot used in software engineering, State the technique...

State the technique Pilot used in software engineering With this approach, new system is introduced into one part of the company (for example into one warehouse of a supermark

Software document, explain software document.create the necessary documents...

explain software document.create the necessary documents for employee management system.

List any three characteristics of a good srs, List any three characteristic...

List any three characteristics of a good SRS.   The SRS should be: Correct , Unambiguous, Complete    1. Correct: An SRS is correct iff every requirement stated therein is one

What is the best effort estimation for software phases?, Hello, I am a CS ...

Hello, I am a CS graduate and i just got a new job in a software development company. My boss assigned me to come up with what he called "the perfect pie chart" basically he says

What is boundary data- Test data, What is boundary data- Test data Ex...

What is boundary data- Test data Extreme/boundary data -  This is data at the limits of validity/acceptability (for instance, if a date is being input, two values at the

Pl sql, The company wants to offer an incentive of free shipping to those c...

The company wants to offer an incentive of free shipping to those customers who have not returned for two months. Create a procedure named PROMO_SHIP_SP that determines who these 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