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

When we need re-engineer, Q. When we need Re-Engineer? When the sys...

Q. When we need Re-Engineer? When the system changes are mainly confined to part of the system then re-engineer that part. When hardware or else software support become

COCOMO model, What is the correct order in which a software project manager...

What is the correct order in which a software project manager estimates various project parameters while using COCOMO?

Explain respiratory quotient, Explain Respiratory quotient? Ans) Respira...

Explain Respiratory quotient? Ans) Respiratory quotient is the ratio among the carbon-dioxide used in photosynthesis to the quantity of oxygen liberated in respiration.

What is version description document, Explain version description document ...

Explain version description document (VDD)? Ans) Version description document (VDD) is a document that accompanies and signifies a given version of a software product. Typically

What is unit testing explain, Q. What is Unit testing explain ? Unit t...

Q. What is Unit testing explain ? Unit testing: Unit testing is undertaken after a module has been coded and successfully reviewed. Unit testing (or module testing) is the te

Software management, i have coursework on software management and dont know...

i have coursework on software management and dont know how to go about it. I want to find out if you will be able to help me on that. The task is to investgate(research informed pa

Illustrate the introduction to flowcharts, Illustrate the Introduction to F...

Illustrate the Introduction to Flowcharts This mainly covers four areas: 1 Common flow chart symbols 2 Writing flowcharts to solve problems 3 Dry running of flowcharts

Define design process, Define design process. Design process is a seque...

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

Perform risk analysis during software testing, Describe how to perform Risk...

Describe how to perform Risk Analysis during software testing. While a test plan is being formed, risks involved in testing the product are to be taken into consideration with

Write down the src for add a node, Write down the SRC for "Add a node" ...

Write down the SRC for "Add a node" Function Add node Description Adds a node to an existing design. Inputs Node type, Design Identifier, Node position Source

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