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 does it mean by business process engineering tools, What does it mean ...

What does it mean by business process engineering tools ?

Explain applicability, Applicability: It is another significant characteri...

Applicability: It is another significant characteristic of a model. The model should be judged by its degree of applicability across software products that change in size, structu

What is assertion testing, A dynamic analysis method which inserts assertio...

A dynamic analysis method which inserts assertions about the relationship among program variables into the program code. The truth of the assertions is determined as the program im

Define software lifecycle, Define Software Lifecycle. Software Lifecycl...

Define Software Lifecycle. Software Lifecycle is the time period beginning with the idea for a Software product ending whenever the Software is unavailable for use. SLC = SL

What are the different architectures developed during bpe, What are the dif...

What are the different architectures developed during BPE? Data architecture framework for the information requires of a business. Application architecture incorporates the

Explain what is the resource discovery problem, Question: (a) Explain ...

Question: (a) Explain what is the resource discovery problem? (b) Distinguish between centralized (hybrid) and decentralized (pure) peer to peer network? (c) Give an e

Encapsulation, Illustrate the use of the concept Encapsulation.

Illustrate the use of the concept Encapsulation.

What is meant by software change, What is meant by software change? Sof...

What is meant by software change? Software change is explained as the change in nature of software as the needs of software changes.

What is test data generators, Q. What is Test data generators? This is...

Q. What is Test data generators? This is a difficult one as well as at least for the present is one for which no general solution exists. One of the practical problems with te

Discuss in detail about data modeling, Discuss in detail about data modelin...

Discuss in detail about data modeling. Data modelling makes use of the ERD. Consists of three interconnected information. The data object. Attributes. Relatio

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