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 seven model primitives in 3d lingo, (a) Copying a graphic imag...

(a) Copying a graphic image from the Web can be as easy as pointing to it and clicking the right mouse button or performing a screen capture. The question is, under what circumsta

What is incremental analysis, Incremental analysis happens when (partial) a...

Incremental analysis happens when (partial) analysis may be performed on an incomplete product to permit early feedback on the development of that product.

SQA Planning, Please let me know that through which techniques software qua...

Please let me know that through which techniques software quality assurance is planned?

What is procedure, What is Procedure? Ans) The step-by-step method follo...

What is Procedure? Ans) The step-by-step method followed to make sure that standards are met.

Evolution and growth of technology, Question 1: Describe the term techn...

Question 1: Describe the term technology. Write a short note on evolution and growth of technology. Definition Description on evolution Growth of technology

Discuss in detail about data modeling, Discuss in detail about data modelin...

Discuss in detail about data modeling. Data modelling makes use of the ERD. Consists of three interconnected information. The data object. Attributes. Relatio

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

Cairs library management system , CARS-LMS: In this section let us try...

CARS-LMS: In this section let us try to learn about a different software package, which is commonly used in some of the libraries abroad. The package is known as CAIRS/LMS or

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