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 dma data transfer, DMA data transfer The position of the DMA co...

DMA data transfer The position of the DMA controller between the other components in a computer system. The CPU communicates with the DMA by the  address and data buses as with

Determine the current failure intensity, Q. Presume a program will experien...

Q. Presume a program will experience a total of 200 failures. Preliminary failure intensity is 16 failure/ CPU hr. It has currently experienced 50 failures. Determine the following

What are the various testing activities, What are the various testing activ...

What are the various testing activities? i. Test planning ii. Test case design iii. Data collection iv. Test execution v. Effective evaluation

Illustrate evolutionary prototyping, Illustrate Evolutionary prototyping ...

Illustrate Evolutionary prototyping Objective: The main objective of this model is to show the working system to the end-user. Example-AI systems. Advantages

What does validation represent, What does Validation represent? Validat...

What does Validation represent? Validation shows the set of activities that ensure that the software that has been built is satisfying the customer needs.

What is a document version, What is a document version? Ans) A document ...

What is a document version? Ans) A document version is a first release (or complete re-release) of a document, as opposed to a revision resulting from issuing change pages to a

Connectivity Issue in Asp.net, Sir, our project is not connecting with SQL ...

Sir, our project is not connecting with SQL server. How to insert own created database in ASP.net

What is the utilisation of cmm, What is the utilisation of CMM? Capabil...

What is the utilisation of CMM? Capability Maturity Model is used in assessing how fine an organisation's processes permit to complete and manage latest software projects

What are the reasons behind to perform white box testing, What are the reas...

What are the reasons behind to perform white box testing? There are three main reasons behind performing the white box testing.  1. Programmers may have some incorrect assum

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