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 test incident report, A document reporting on any event that happen...

A document reporting on any event that happens during testing that needs further investigation.

Describe dom browser extension, Describe DOM browser extension. - Docum...

Describe DOM browser extension. - Document Object Model (DOM) browser extension is a SilkTest add-on component for testing Web applications. - DOM browser extension communic

What is the use of a data flow diagram, Q. What is the use of a data flow d...

Q. What is the use of a data flow diagram? Explain the important concepts of data flow diagram. Ans. A data flow diagram is utilized to show the functional view of an applica

Structured analysis model, Structured Analysis Model Structured  analy...

Structured Analysis Model Structured  analysis is the  most  broadly  used  of  requirements  modeling  techniques  relies  on flow modeling and data modeling to established t

Write short notes on decision table, Q. Write short notes on Decision Table...

Q. Write short notes on Decision Table? Decision Table: While the process logic for a process involves multiple conditions as well as is very complicated it isn't advisable t

Identify all activity dependencies in the project, Question: The activi...

Question: The activities in a project are given the PERT chart below: a) Identify all activity dependencies in the project. b) Clearly distinguish between critical

Explain the essential api concepts associated with j2me, Question: (a) ...

Question: (a) State and explain the essential API concepts associated with J2ME. (b) Connected Limited Device Configuration provides two types of application security; stat

What is software configuration management, What is Software configuration m...

What is Software configuration management? ans)Software Configuration Management (SCM) is the control and the recording of alter that are made to the software and documentation

PERT CHART, WRITE A SHORT NOTE ON PERT CHART

WRITE A SHORT NOTE ON PERT CHART

What is a modular system, Q What is a modular system? List the important pr...

Q What is a modular system? List the important properties of a modular system? Ans: A modular system consists of well-defined manageable units to well-defined interfaces among

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