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 problems arise if two modules have high coupling, What problems arise ...

What problems arise if two modules have high coupling? Coupling means the interconnection of dissimilar modules with each other or we can say, it tells about the interrelations

what is random testing, What is Random Testing? This is one of process...

What is Random Testing? This is one of process used to exercise a class. It is based on developing a random test series that tries the minimum number of operations typical to th

Explain data accuracy, Data accuracy Don't collect redundant data  T...

Data accuracy Don't collect redundant data  The questions to be answered should be decided in advance and the needed data identified. Tell people why the data is being co

What is dfd, What is DFD? Data Flow Diagram depicts the information flo...

What is DFD? Data Flow Diagram depicts the information flow and the transforms that are applied on the data as it moves from input to output.

Explain test plan, Documentation specifying the scope, approach, resources,...

Documentation specifying the scope, approach, resources, and schedule of intended testing activities. It signifies test items, the features to be tested, the testing tasks, respons

Explain the incremental model, Explain the Incremental Model Iterative ...

Explain the Incremental Model Iterative and Incremental Models follow more or less the similar approach. Incremental Model is an intuitive approach to the waterfall model. Mult

Write the steps followed in testing, Write the steps followed in testing? ...

Write the steps followed in testing? i. Unit testing - The individual components are tested in this type of testing. ii. Module testing - Related collection of independent c

Implicit and an explicit conceptual model, What is the difference among an ...

What is the difference among an implicit and an explicit conceptual model?

What is user documentation, "User documentation" is a document that explain...

"User documentation" is a document that explains the way a software product or system should be used to get the desired results.

Salient features of ISO 9001 certification, Q. Salient features of ISO 9001...

Q. Salient features of ISO 9001 certification? Ans) Salient(noticeable) features of ISO 9001 certification are :- All documents concerned with the development of a softw

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