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

Waterfall model is more advantageous than adhoc methods, Explain why waterf...

Explain why waterfall model is more advantageous than adhoc methods.      Ad-hoc Process Models- "Process capability is unpredictable due to the software process is constantly

Define measure and metrics, Define measure and metrics. Measure is  a q...

Define measure and metrics. Measure is  a quantitative indication of the extent, dimension, amount or size of some attribute of a product or process. Metrics is termed as th

What is a test configuration manager, Test Configuration Managers handles t...

Test Configuration Managers handles test environments, scripts, software and test data. Depending on the project, single person may wear more than single hat. For example, Test Eng

What is parallel/audit testing, Parallel/audit testing is testing where the...

Parallel/audit testing is testing where the user reconciles the output of the latest system to the output of the present system to determine the new system performs the operations

Iterative Enhancement Model, what is the advantage of Iterative Enhancement...

what is the advantage of Iterative Enhancement Model in developing a system?

Srs, why srs is also called black box specificaton

why srs is also called black box specificaton

Explain spiral model, Explain Spiral model The spiral model is separ...

Explain Spiral model The spiral model is separated into number of frame works. These frameworks are indicated by task regions. Usually there are six task regions. In spir

Determine the concept of concurrency, Determine the concept of Concurrency ...

Determine the concept of Concurrency The basic concept in computer programming is concept of handling more than one task at a time. Many programming problems need that the pro

Describe the various types of coupling, Describe the various types of coupl...

Describe the various types of coupling? i. Data coupling - The data coupling is possible by parameter passing or data interaction. ii. Control coupling - The modules share c

What are the principles of testing, What are the principles of testing ...

What are the principles of testing Below are some of the principles of testing:  i)  All tests must be performed according to user requirements.  ii)  Planning of tests m

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