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

Test-driven software development, A) What is test-driven software developme...

A) What is test-driven software development? Why test-driven software development is significant in agile development approach?   B) Explain how the following software develo

What specific languages can be used in srs, What specific languages can be ...

What specific languages can be used in SRS? What are the advantages of using these specific languages of SRS? Ans. Requirement specification necessitates the utilization of s

Explain the traces debugging method, Q. Explain the Traces debugging method...

Q. Explain the Traces debugging method? Traces:-Printout contains merely certain memory and register contents and printing is conditional on some event occurring. Typical condi

Explain the reuse maintenance model, Explain the reuse maintenance model wi...

Explain the reuse maintenance model with the help of a diagram. Reuse maintenance model: This model is based on the principal  that maintenance could be viewed as an activity i

Database definition - micro cds/isis application, Database Definition: ...

Database Definition: There are four basic steps involved in defining a database. They are:  i)  Creating a Field Definition Table (FDT) : The possible content of data recor

List the pre-requisites for white-box testing, List the pre-requisites for ...

List the pre-requisites for white-box testing Pre-requisites for white-box testing are similar to black-box testing with one key difference: - During white-box testing, test

Explain automated testing, Automated testing is a formally specified and co...

Automated testing is a formally specified and controlled method of formal testing approach. or That part of software testing that is assisted with software tool(s) that does

Explain the concept of top down design, Q. Explain the concept of Top down ...

Q. Explain the concept of Top down design? Top down design: A top down design approach begins by identifying the major modules of the system decomposing them into their lower

Mca, encoded micro instruction vs unecoded micro instruction

encoded micro instruction vs unecoded micro instruction

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