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

Compare and contrast reliability and availability, Q. Compare and contrast ...

Q. Compare and contrast reliability and availability? Ans. Reliability: The probability of failure-free system operation over a specified time in a given environment for a gi

What is requirements definition description, What is Requirements Definitio...

What is Requirements Definition Description Output of requirements of engineering process is Requirements Definition Description (RDD). Requirements engineering can be defined

XML, Ask Create an XML file with markup tags and some sample data to repres...

Ask Create an XML file with markup tags and some sample data to represent a list of invoices.

What is cardinality in data modeling, What is cardinality in data modeling?...

What is cardinality in data modeling? Cardinality in data modeling, cardinality specifies how the number of occurrences of single object is related to the number of occurrences

Dma, what effect does memory have on dma? what about on board cache? how mu...

what effect does memory have on dma? what about on board cache? how much are the system buses available?

State the level 3 of kpas, State the level 3 of KPAs Level 3 KPAs: ...

State the level 3 of KPAs Level 3 KPAs: 1)   Organisation Process Focus (OPF): Organisations responsibility is fixed for software process activities which improve the ul

What is code restructuring, Q. What is Code Restructuring? Code Restru...

Q. What is Code Restructuring? Code Restructuring : It is performed to acquiesce a design that produces the same function but with higher quality than the original program. Ge

Explain in detail about software maintenance, Explain in detail about softw...

Explain in detail about software Maintenance. Software maintenance is an action in which program is modified after it has been put into use. Maintenance is termed as the

Project, hello, i am struggling with my final year project and i dont have ...

hello, i am struggling with my final year project and i dont have that huge amount of time to do it??

Explain the sequential circuit, Sequential circuit:- A sequential circu...

Sequential circuit:- A sequential circuit is an interconnection of gates and flip-flops.  The gates by themselves constitute a combinational circuit, but when contained with th

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