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

Discuss the reuse of software at different levels, Question 1 Discuss the ...

Question 1 Discuss the Limitation of the linear sequential model in software engineering Question 2 What is Software reliability? Why reliability is more important than effic

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

Explain how to define severity rating in your project, Explain how to defin...

Explain how to define Severity Rating in your project. Severity rating is a combination of three factors: - The frequency of the problem occurrence. It could be common / ra

Define entity and relationship diagram, State Entity and relationship diagr...

State Entity and relationship diagram. ERD depicts linkage between data objects. The ERD is the notation that is used to execute the data modelling activity. The primary

How abstraction used in stepwise refinement, Q. How Abstraction used in ste...

Q. How Abstraction used in stepwise refinement? Abstraction:- Abstraction permits one to concentrate on a problem at some level of generalization without regard to irrelevant l

Nonfunctional requirements of clue-less system, Nonfunctional Requirements ...

Nonfunctional Requirements Performance Requirements PE-1: The Clue-Less system shall accommodate 6 users during peak usage, with an estimated average session duration of 15 m

Project, hello, i am struggling with my final year project and i dont have ...

hello, i am struggling with my final year project and i dont have that huge amount of time to do it??

Explain about integration testing, Q. Explain about Integration testing? ...

Q. Explain about Integration testing? Integration testing: The primary objective of integration testing is to test the module interfaces, i.e. there are no errors in the para

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