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

What are the different types of cohesion, What are the different types of C...

What are the different types of Cohesion? i. Coincidentally cohesive -The modules in which the set of tasks are related with each other loosely then such modules are called as

Path & Path Production, Path & Path Production, Syntax testing, Computer En...

Path & Path Production, Syntax testing, Computer Engineering Take the following flow graph and use the procedure in chapter 8 to derive an equivalent regular expression. Show all i

What are the reasons behind to perform white box testing, What are the reas...

What are the reasons behind to perform white box testing? There are three major reasons behind performing the white box testing. 1. Programmers may have some incorrect assum

How a prototype can be categorised, How a prototype can be categorised ...

How a prototype can be categorised 1.  A paper prototype which is a model depicting human machine interaction in a form which makes user understand how such interaction, would

Discuss in detail about cocomo model, Discuss in detail about COCOMO model....

Discuss in detail about COCOMO model. Constructive Cost Model. Software cost estimation gives the opportunity to estimate of how much months a man take to develop a softw

What is software requirement specification, What is Software requirement Sp...

What is Software requirement Specification (SRS)? Software Requirement Specification Document is the output of requirement examines stage of the software development life cycle

Determine the principle stages of vord method, What are the principle stage...

What are the principle stages of VORD method? Viewpoint identification: Identify the services provided to each point of view Viewpoint structuring: Sorting related viewpoint

Discuss in detail about structural modeling, Discuss in detail about Struct...

Discuss in detail about Structural Modeling. Structural model includes a detail refinement of ERD, data flow model and control flow model. Creating an ERD. For example

What is ripple effect, Q. What is ripple effect? How does it affect the sta...

Q. What is ripple effect? How does it affect the stability of a program? Ans. The ripple effect is a term used to explain a situation where like the ever expanding ripples

What is common coupling, Q. What is Common coupling? Common coupling: ...

Q. What is Common coupling? Common coupling: With general coupling module A and module B have shared data. Global data areas are usually found in programming languages. Formu

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