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

Explain test harness systems and test archiving systems, Q. Explain Test ha...

Q. Explain Test harness systems and Test archiving systems? Test harness systems: This is one that is bound around the test object and that permits the easy modification a

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

What tasks do checkpoints perform in QTP, What tasks do checkpoints perform...

What tasks do checkpoints perform in QTP? Checkpoints in QTP are used to verify information which is expected to be displayed when running test. Following are 8 types of availa

Explain software testing, Explain Software Testing. Why is it important t...

Explain Software Testing. Why is it important to conduct the testing of software? Software testing is verifying if software meets the customer's requirements; if it has high

What is hybrid testing, Explain Hybrid Testing? Ans) A mixture of top-do...

Explain Hybrid Testing? Ans) A mixture of top-down testing combined with bottom-up testing of prioritized or available components.

What is mutation testing, Mutation testing is type of software testing wher...

Mutation testing is type of software testing where our goal is to make mutant software fail, and therefore demonstrate the adequacy of our test case.

Script file, how to make script file volume of pyramid

how to make script file volume of pyramid

Define cohesion and coupling, Q. Define cohesion and coupling? Give suitabl...

Q. Define cohesion and coupling? Give suitable examples. Ans Coupling: Coupling refers to the strength of the relationship between modules in a system. Coupling represents how

Determine the importance of software engineering, Importance of Software En...

Importance of Software Engineering As the application domains of software are becoming complicated and design of big software without a systematic method is virtually impossib

What is process and product quality, What is Process and product quality? ...

What is Process and product quality? The quality of a developed product is influenced by the quality of the production process. This is significant in software development

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