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 dom browser extension, Describe DOM browser extension. - Docum...

Describe DOM browser extension. - Document Object Model (DOM) browser extension is a SilkTest add-on component for testing Web applications. - DOM browser extension communic

Explain dynamic testing, Verification or validation performed which impleme...

Verification or validation performed which implements the system's code.

Explain practical process quality, Practical process quality Explain pr...

Practical process quality Explain process standards such as how reviews should be conducted, configuration management, etc. Monitor the development process to make sure that

Explain validation, Validation (Product Oriented) Validation is worried...

Validation (Product Oriented) Validation is worried with whether the right functions of the program have been properly executed, and that this function will properly make the c

Describe the implementation of new technology, Question 1: Prepare a sh...

Question 1: Prepare a short note on technology strategy. Explain in brief about the innovation management. Question 2: What is Research and Development (R&D), and how i

Explain quality control, The operational methods and processes used to achi...

The operational methods and processes used to achieve quality requirements.

Draw a memory map for a system, Draw a memory map for a system with a memor...

Draw a memory map for a system with a memory capacity of 256MB. Each memory location in the system is 8 bits. Assume the system has one 4 MB memory block used as ROM residing at th

Define top-down testing, Define top-down testing. System developed star...

Define top-down testing. System developed starting from most general modules. Testing begins from the most general module.

Product lines, Product lines Being well-informed about all your company...

Product lines Being well-informed about all your company products and services is necessary for the selling process and to giving good customer service.  A salesperson shoul

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