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

How to compute the cyclomatic complexity, How to compute the cyclomatic com...

How to compute the cyclomatic complexity? The cyclomatic complexity can be computed by any one of the following ways. 1. The numbers of regions of the flow graph correspond

Development phases of the detailed cocomo model, Q. Explain the development...

Q. Explain the development phases of the detailed COCOMO model. Ans A software development is performed in four successive phases which are as follows 1 : plan/requirement

What is sci, What is SCI? Software Configuration Item is in order that ...

What is SCI? Software Configuration Item is in order that is carried as part of the software engineering process.

The level at which the software uses scarce resources, The level at which t...

The level at which the software uses scarce resources Efficiency level.

Data structure, what do you understand by recursion.explain the simulating ...

what do you understand by recursion.explain the simulating recursion in brief.program of fabinacon series by recursion

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

Explain code walkthrough, A manual testing [error detection] method where p...

A manual testing [error detection] method where program [source code] logic [structure] is traced manually [mentally] by a group with a small set of test cases, whereas the state o

Mention some of the drawbacks of rad model, Mention some of the drawbacks o...

Mention some of the drawbacks of RAD model. Not suitable for largescale projects. Commitment of developers & customers are required. Not appropriate when technical ris

Mention the factors to be considered during system modelling, Mention some ...

Mention some of the factors to be considered during System Modeling. Simplifications Assumptions Constraints

Give the overview of application software, Question 1 Give the classificat...

Question 1 Give the classification of computers and explain them briefly Question 2 Give the overview of application software Question 3 Explain the three main types of

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