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

Describe in brief about the elementary process, Elucidate elementary proces...

Elucidate elementary process. Software applications are a combination of various elementary processes. Various elementary processes come together to form an application. Ele

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

What is a modular system, Q What is a modular system? List the important pr...

Q What is a modular system? List the important properties of a modular system? Ans: A modular system consists of well-defined manageable units to well-defined interfaces among

Define partitioning, Partitioning:- Problems are often too large and diffi...

Partitioning:- Problems are often too large and difficult to be understood as a whole. For this reason, we tend to partition such difficulties into parts that can be easily unders

Explain communicational cohesion, Communicational cohesion : Communicationa...

Communicational cohesion : Communicational cohesion is when parts of a module are grouped because they operate on the similar data (e.g. a module which operates on the similar reco

What is operational testing, Testing conducted to consider a system or comp...

Testing conducted to consider a system or component in its operational environment. Contrast with development, testing,; testing, acceptance;

C++, program for full subtractor?

program for full subtractor?

Iterative and evolutionary development, what is iterative and evolutionary ...

what is iterative and evolutionary developments? how iteration help in refining requirements

Describe incremental model, Q. Describe incremental model? Define core prod...

Q. Describe incremental model? Define core product and detailed plan. Ans. The incremental model is proposed by D.L PARNAS. It is basically implemented by combining elements

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