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

Iterative enhancement and evolutionary development model, Q. Differentiate ...

Q. Differentiate between iterative Enhancement Model and Evolutionary Development model. Ans. Iterative Enhancement Model: This model has the similar phases as the waterfall

Why is maintenance of a software important, Why is maintenance of a softwar...

Why is maintenance of a software important?  The alteration of a software product, after delivery, to correct faults, to improve performance or other attributes, or to adapt th

Online bakery-equipments ordering system, Question: Draw a class diagra...

Question: Draw a class diagram which represents the information handled by the Online Bakery-equipments Ordering System. Your class should briefly and simply reflect the relat

State about the software requirements specification, State about the Softwa...

State about the Software Requirements Specification This document is produced as output of requirement analysis.  Requirement analysis involves obtaining a clear and thorough

Type of organizational behaviour, what is type of organizational behaviour ...

what is type of organizational behaviour like classical,neo and morden?

Software project planning entails what activities, Software project plannin...

Software project planning entails what activities? Software project planning entails the many activities: -  Estimation:  o Effort, , resource, cost and project duratio

Category Partition Testing and Data Flow Assignment, The following program ...

The following program will display an integral solution to the quadratic equation ax2+bx+c for integral values of a,b, and c, where a,c fall between 0 and 10, while b falls between

Explain structural things using conceptual model, Question: Part of the...

Question: Part of the conceptual model of UML is made up of four "things": "Structural things", Behavioral things", "Grouping things" and "Annotational things". Explain, using

What is the use of cmm, What is the use of CMM? Capability Maturity Mod...

What is the use of CMM? Capability Maturity Model is used in assessing how well an organisation's processes permit to complete and manage latest software projects.

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