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 throw-away prototyping and evolutionary prototyping, Q. Explain thr...

Q. Explain throw-away prototyping and evolutionary prototyping. Discuss the differences between the two. Ans Throw-Away Prototyping as well called close ended prototyping .

Explain the term - code complete, Explain the term - Code Complete - Ph...

Explain the term - Code Complete - Phase of development where functionality is implemented completely with only bug fixes remaining. - All functions from functional specific

Write a short note on structure chart, Q. Write a short note on structure c...

Q. Write a short note on structure chart? Structure Chart is a most important program design technique and shows all components of code in a hierarchical format. Structure

What is data modelling, What is data modelling? Data modeling is the ba...

What is data modelling? Data modeling is the basic step in the examine modeling. In data modeling the data objects are examined independently of processing. The data model s

Explain about rapid prototyping techniques, Explain about rapid prototyping...

Explain about rapid prototyping techniques. Executable specification languages. Used to living the system specification. It is expressed in a formal, mathematical la

What are the objectives of analysis modelling, What are the objectives of A...

What are the objectives of Analysis modelling? i. To explain what the customer requires. ii. To establish a basis for the creation of software design. iii. To devise a se

What is software, What is Software Software is nothing but a collecti...

What is Software Software is nothing but a collection of computer programs that are related documents that are indented to give desired features, functionalities and good per

#title.help with labs for Rabbit 4000, I need help two thing 1-understand h...

I need help two thing 1-understand how can I programme rabbit 4000 2- do labs set for Rabbit 4000

Expert Systems, Explain model-based expert systems and frame-based expert s...

Explain model-based expert systems and frame-based expert systems

What is process improvement, What is Process improvement? Understanding...

What is Process improvement? Understanding existing processes and introducing process changes to improve product quality, decrease costs or accelerate schedules. Most proces

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