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

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

What do you mean by software engineering, Q. What do you mean by Software E...

Q. What do you mean by Software Engineering? What is the use of Software Engineering? Ans) Software engineering is engineering for software development. A simple program can be

What is closed box testing, Closed box testing is similar as black box test...

Closed box testing is similar as black box testing. Black box testing a type of testing that examine only externally visible behavior.

Elicitation, explain the goal oriented requirement elicitation process with...

explain the goal oriented requirement elicitation process with a neat sketch

Define the process of debugging, Define the process of debugging Genera...

Define the process of debugging Generally when developing the code, software developer also carries out some testing. This is called debugging. This unearths the defects that s

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

Drive an expression for peak manning of a project, Q. Drive an expression f...

Q. Drive an expression for peak manning of a project using Nordes - Rayleigh equation . Ans Norden Rayleigh curve utilized to approximate software project . M(t) =Man powe

SDLC model, What is the advantage of using prototype software development m...

What is the advantage of using prototype software development model instead of waterfall model?

Briefly describe what are deployment diagrams, Question: (a) Compare t...

Question: (a) Compare the following pairs of terms as used in object oriented software engineering: (i) Association and Association class (ii) Multiplicity and multiple

How print statements used in software testing, Q. How Print statements used...

Q. How Print statements used in Software testing? Print statements:-The standard print statement in the language being utilized is sprinkled throughout the program to output va

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