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

Ethical issue moduel, i want to select topic to my ethical issues assignmen...

i want to select topic to my ethical issues assignment can u propose reasonable topic?

Describe the advantages of proper inheritance, Describe the advantages of p...

Describe the advantages of proper inheritance. The biggest advantages of proper inheritance are:  a.) substitutability and b.) extensibility.

Define process specification, Define Process Specification. Process Sp...

Define Process Specification. Process Specification is used to explain all flow model processes that appear at the final level of refinement. Check & Convert pressure Ch

Explain productivity, Productivity Productivity refers to metrics and c...

Productivity Productivity refers to metrics and calculates of output from production processes, per unit of input. Productivity P may be conceived of as a metrics of the techni

Quality control concept, (i) Concept definition of Quality Control and Qual...

(i) Concept definition of Quality Control and Quality Assurance (ii) Tools used in quality control (iii) Acceptance sampling and process control (iv) Statistical tools for

What are the advantages of smoke testing, What are the benefits of smoke te...

What are the benefits of smoke testing? Integration risk is decreased. The quality of the end-product is getting better. Error diagnosis and correction are simplified. Assessme

What is bottom-up testing, Bottom-up testing is a method of integration tes...

Bottom-up testing is a method of integration testing. A test engineer makes and uses test drivers for components that have not yet been developed, because, with bottom-up testing,

Swot analysis, how to threat into opportunities and weaknesses into streng...

how to threat into opportunities and weaknesses into strength

Explain lines of code (loc), Lines of code (LOC) is a software metric used...

Lines of code (LOC) is a software metric used to calculate the size of a software program by counting the number of lines in the text of the program's source code. LOC is typicall

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