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 are the benefits of prototyping, What are the benefits of prototyping?...

What are the benefits of prototyping? i. Prototype uses as a basis for deriving system specification. ii. Design quality can be better. iii. System can be handled efficie

When must you stop testing, When must you stop testing? It is very diff...

When must you stop testing? It is very difficult to determine as many modern software applications are complex and run in such an interdependent environment that complete testi

Important issues that a srs must address, The important issues that a SRS m...

The important issues that a SRS must address are:  (a) System goals and requirements are different (b) Request Definition (c) Request Specification (d) Software Specif

What are the characteristics of software, What are the characteristics of S...

What are the characteristics of Software Software is engineered or formed; it is not manufactured in the classical sense. Software doesn't wear out. Although the indu

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

What are the advantages and disadvantages of big-bang, What are the advanta...

What are the advantages and disadvantages of big-bang? Advantages: This approach is easy. Disadvantages: It is hard to debug. It is not simple to isolate errors while testin

Project, How to create A system to incorporate uploading and display of dif...

How to create A system to incorporate uploading and display of different media types on the web e.g. audio, video, graphics, text, power point files, excel files, Word files on the

What is rad approach, What is RAD Approach As the term suggests, this ...

What is RAD Approach As the term suggests, this model gives a quick approach for software development and is based on a linear sequential flow of numerous development processe

Explain product and process standards, Product and process standards Pr...

Product and process standards Problems with standards They may not be seen as relevant and up-to-date by software engineers. They often include too much bureaucratic form

Explain the design principles, Explain the design principles. The d...

Explain the design principles. The design process should not endure from tunnel vision. The design should be traceable to the analysis model. Design should not re

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