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

Determine the cyclomatic compexity, consider the following flow chart, a. D...

consider the following flow chart, a. Draw the flow graph and show the edges, regions and nods clearly b. show the independent paths c. calculate the cyclomatic complexity in three

Explain process, Explain Process? The work effort that makes a product. ...

Explain Process? The work effort that makes a product. This contains efforts of people and equipment guided by policies, standards, and procedures.

When must a function throw an exception, When must a function throw an exce...

When must a function throw an exception? A function must throw an exception when it's not able to fulfil its promise. As soon as function detects a problem which prevents it

Determine the steps of structured requirements definition, Determine the di...

Determine the different steps of Structured Requirements Definition Step 1: Make a user level data flow diagram. This step is meant for gathering requirements with intera

Need help with my program deadline is tomoroow , I have a vb.net applicatio...

I have a vb.net application i would like to add database function + coding the the function to let the application work and also to add a login window for the customers + custom

Write the definition of design process, Write the definition of design proc...

Write the definition of design process. Design process is a sequence of steps carried by which the requirements are transformed into a system or software model.

Frame diagrams, We discussed the importance of framing a problem in order t...

We discussed the importance of framing a problem in order to understand the problem better and be able to develop a solution more quickly and easily. In this homework, you are ask

Construct an e-r diagram, Construct an E-R Diagram for the application desc...

Construct an E-R Diagram for the application described on the next page. Include any additional assumptions you made about the application requirements. The assumptions may not dir

What is process and product quality, What is Process and product quality? ...

What is Process and product quality? The quality of a developed product is influenced by the quality of the production process. This is significant in software development

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