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

The majority charge carriers in p-type semiconductor, The majority charge c...

The majority charge carriers in p-type semiconductor are?? The majority charge carriers are  holes.

Distinguish software faults and software failures, Distinguish software fau...

Distinguish software faults and software failures Ans: In case of a failure, the software does not do what the user expects. A fault is a programming error that may or may not

What is meaning of attributes, Attributes   Attribute is a characteri...

Attributes   Attribute is a characteristic or property of an entity which is of interest to the organisation. It's represented by oval shaped box with name of attribute writt

Explain the bottom-up approach, What is bottom-up approach? System deve...

What is bottom-up approach? System developed beginning  from detailed modules. Testing begins from the detailed modules and proceeds up to the higher levels of hierarchy.

What are the elements of design model, What are the elements of design mode...

What are the elements of design model? i. Data design ii. Architectural design iii. Interface design iv. Component-level design

Illustrate evolutionary prototyping, Illustrate Evolutionary prototyping ...

Illustrate Evolutionary prototyping Objective: The main objective of this model is to show the working system to the end-user. Example-AI systems. Advantages

Describe briefly on the seven stages in a product life cycle, Problem 1: ...

Problem 1: Describe briefly on the seven stages in a product life cycle. Problem 2: What do you meant by SSAD? Explain in detail. Problem 3: What is a predictiv

Explain the stages of rapid application development model, Question: a)...

Question: a) It has often been argued that Rapid Application Development results in small stand-alone systems running in isolation. Discuss. b) Rapid Application developmen

How is the state diagram helpful to an engineer, Problem: a) Assume a w...

Problem: a) Assume a washing machine. List all possible states of the washing machine. Draw a state diagram showing also the events triggering the change of states where poss

Discuss possible ramifications of these opposing obj, AskDiscuss possible r...

AskDiscuss possible ramifications of these opposing objectives on the project question #Minimum 100 words accepted#

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