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

What is integration testing, What is Integration testing: - This test i...

What is Integration testing: - This test is performed to determine the interfaces among system components, interactions between the application and the hardware, file system, a

XML, Ask Create an XML file with markup tags and some sample data to repres...

Ask Create an XML file with markup tags and some sample data to represent a list of invoices.

Explain the process of software testing, Explain the process of Software Te...

Explain the process of Software Testing Testing is the process of running the software on manually created inputs with intention to find errors. In process of testing, an atte

Different type of testing tools, Different type of testing tools. (a) T...

Different type of testing tools. (a) Test Case Generators: (b) Capture/ Playback and Test harness tools: (c)  Coverage Analysis Tools: (d) Test Comparators e) Memor

What is review, What is Review? Ans) A method or meeting during which a ...

What is Review? Ans) A method or meeting during which a work product or set of work products, is shown to project personnel, managers, users, customers, or other interested part

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

Describe the various steps of the reuse-oriented model, Q. Describe the var...

Q. Describe the various steps of the reuse-oriented model? The reuse-oriented model, also called reuse-oriented development (ROD), is a method of software development in which

Incremental model, four circumstances where incremental model is appropriat...

four circumstances where incremental model is appropriate?

Explain the meaning of throw away prototyping, What is meant by Throw away ...

What is meant by Throw away Prototyping? Giving the user a system which is incomplete and then augmenting and modifying it so that user requirements become clear. The obj

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