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 syntax, 1) The relationship between characters or groups of charact...

1) The relationship between characters or groups of characters independent of their meanings or the manner of their interpretation and use; 2) The formation of expressions in a

What are the rules for making DFD, What are the Rules for making DFD   ...

What are the Rules for making DFD   The below factors must be considered when making DFDs:  1.   Keep a note of all processes and external entities. Give unique names to th

Explain structural testing, Testing that takes into account the internal me...

Testing that takes into account the internal mechanism [structure] of a system or component. Types contain branch testing, path testing, statement testing. Testing to insure eve

How messages can be used in software engineering, Q. How Messages can be us...

Q. How Messages can be used in software engineering? Messages:- The interaction or communication between the different objects and classes is done by passing messages. The ob

When do you choose automated testing over manual testing, When do you choos...

When do you choose automated testing over manual testing? Automation is chosen when -A similar set of tests need to be repeated again and again -When a single test requi

Explain the software scope, Define software scope. The first software p...

Define software scope. The first software project management activity is the determination of software scope. Scope is defined answering the following questions. Context: Wh

Determine the level 0 and level 1 of DFD, Determine the level 0 and level 1...

Determine the level 0 and level 1 of DFD External entities provide input data for processing. During processing, some intermediate data is generated. After final processing, fi

How lru technique is implemented, How LRU technique is implemented The ...

How LRU technique is implemented The LRU policy is more difficult to execute but has been more attractive on the assumption that the least recently used page is a better candid

Software quality and testing issues, Software quality and testing issues: ...

Software quality and testing issues: The aim of this assignment is to enable students to conduct an in-depth research on software quality and testing issues. Software Quality

List the task regions in the spiral model, List the task regions in the Spi...

List the task regions in the Spiral model. Customer communication - In this region it is suggested to make customer communication. Planning - All planning activities are car

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