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

Resource usage with reference to software reliability models, Q. Resource u...

Q. Resource usage with reference to software reliability models? Resource usage: It is linearly proportional to implementation time t and mean failures experienced μ. Let Xr

What are the common approaches in debugging, What are the common approaches...

What are the common approaches in debugging? Brute force method: The memory dumps and run-time tracks are examined and program with write statements is loaded to obtain clues t

What is data binding, Q. What is Data Binding? Ans. The matrix that at...

Q. What is Data Binding? Ans. The matrix that attempts to imprison the module-level concept of coupling is data binding. Data binding are a calculate that captures the data in

Explain in detail the design concepts, Explain in detail the design concept...

Explain in detail the design concepts Abstraction Data abstraction Functional abstraction  •Control abstraction Information hiding •Every module in the s

System analyst, Explain the role and functions of a Systems Analyst in the ...

Explain the role and functions of a Systems Analyst in the overall project development.

Explain the concept of bottom-up design, Q. Explain the concept of bottom-u...

Q. Explain the concept of bottom-up design? Bottom up design: This approach make possible a style of design where we decide how to combine these modules to provide larger ones

Explain about the software metrics, SOFTWARE METRICS Measurement is fun...

SOFTWARE METRICS Measurement is fundamental to an engineering discipline and software engineering is no exception. Software metric is a quantitative measure which is derived fr

What is embedded system partitioning, Question : (a) What is embedded s...

Question : (a) What is embedded system partitioning? What is decided during partitioning? (b) What is the difference between structural and functional partitioning? Which on

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