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 error guessing, Explain Error guessing? Ans) Test data selection...

Explain Error guessing? Ans) Test data selection method. The selection criterion is to pick values that seem likely to reason errors.

Supermarkets, A supermarket requires to develop software to encourage regul...

A supermarket requires to develop software to encourage regular customers. For this the customer requires to supply his name address telephone number and driving license number. A

Define software prototyping, Define software prototyping. Software prot...

Define software prototyping. Software prototyping is explained as a rapid software development for validating the requirements.

Two software characteristics, Discuss any two software characteristics. ...

Discuss any two software characteristics. Software is not manufactured : The life of software is from method exploration to the retirement of the software product. It is one t

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 unit testing explain, Q. What is Unit testing explain ? Unit t...

Q. What is Unit testing explain ? Unit testing: Unit testing is undertaken after a module has been coded and successfully reviewed. Unit testing (or module testing) is the te

Determine the cyclomatic complexity, Q. Consider the program given below ...

Q. Consider the program given below void main() { int i,j,k; readln (i,j,k); if( (i k) ) { writeln("then part"); if (j writeln ("j

Explain incremental model, Explain incremental model? The incremental ...

Explain incremental model? The incremental model is proposed by D.L PARNAS. It is basically executed by combining elements of linear sequential model and iterative prototyping

What is test methodology, Test methodology is up to the end client, and can...

Test methodology is up to the end client, and can be used, reused, and moulded to your end client's requirements. Rob Davis believes that using the right test methodology is signif

What is internal interrupt, Internal Interrupt Cause because of illegal...

Internal Interrupt Cause because of illegal or erroneous use of an instruction or data. Internal interrupts are also known as traps. Internal interrupts are initiated because o

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