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

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

List the task regions in the spiral model, List the task regions in the Spi...

List the task regions in the Spiral model. Customer communication - In this region it is suggested to make customer communication. Planning - All planning activities are car

What is vertical partitioning, What is Vertical partitioning 1. The Co...

What is Vertical partitioning 1. The Control & work should be Modular Hierarchy for each distributed top-down in the program major program function structure 2. Higher prob

What is a boundary value analysis, What is a boundary value analysis? A...

What is a boundary value analysis? A boundary value analysis is a testing method in which the elements at the edge of the domain are selected and tested. It is a test case desi

Explain about data coupling, Q. Explain about Data coupling? The depend...

Q. Explain about Data coupling? The dependency among module A and B is said to be data coupled if their dependency is based on the fact they communicate by merely passing of da

Ftr, EXPLAIN ABOUT DEFECT AMPLIFICATION AND REMOVAL IN SOFTWARE ENGINEERING...

EXPLAIN ABOUT DEFECT AMPLIFICATION AND REMOVAL IN SOFTWARE ENGINEERING

Recreating Sections of Google+ in C, Create a compound data type called Pos...

Create a compound data type called Post to store messages posted on Google+. Post should include: Name / Data Type / Description date / char [9] / date fields for

Difference between restructuring and forward engineering, Problem 1. Ex...

Problem 1. Explain why the use of a standard high-level language does not guarantee that software will be portable across a range of machines 2. Draw possible data flow diag

What is requirement elicitation methods, Q. What is requirement elicitation...

Q. What is requirement elicitation methods? Subsequent to receiving the problem statement from the customer the first step is to arrange a meeting with the customer. During the

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