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 embedded system partitioning, Question : (a) What is embedded s...

Question : (a) What is embedded system partitioning? What is decided during partitioning? (b) What is the difference between structural and functional partitioning? Which on

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

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

Explain rad model, RAD Model Rapid Application Development Model is...

RAD Model Rapid Application Development Model is the part of incremental model. Achieves the high speed development using component based construction. Phases

What is test log, What is Test log? A chronological record of all releva...

What is Test log? A chronological record of all relevant details about the implementation of a test.

What is software architecture, What is software architecture The softwa...

What is software architecture The software architecture of a program or computing system is the structure or structures of the system, which comprises software components, the

What is parallel testing, Testing a new or an changed data processing syste...

Testing a new or an changed data processing system with the similar source data that is used in another system. The other system is taken as the standard of comparison.

System analyst, Explain the role and functions of a Systems Analyst in the ...

Explain the role and functions of a Systems Analyst in the overall project development.

Advantage of prototype software development model, Q What is the advantage...

Q What is the advantage of utilizing prototype software development model instead of waterfall model? As well explain the effect of defining a prototype on the overall cost of the

Define architectural evolution, What is architectural evolution? Archit...

What is architectural evolution? Architectural evolution is the practice of modifying a system from a centralized architecture to a distributed architecture like client server.

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