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 criticality, What is Criticality? The degree of impact that a ne...

What is Criticality? The degree of impact that a necessity, module, error, fault, failure, or other item has on the operation of a system or development.

How can we use spiral model in large-scale systems, Q. How can we use Spira...

Q. How can we use Spiral model in large-scale systems? Spiral model is as well known as spiral life cycle model is the system development life cycle model utilized in informati

Explain usability testing, Usability testing is testing of 'user-friendline...

Usability testing is testing of 'user-friendliness'. User interviews, surveys, video recording of user sessions and other methods can be used. Programmers and developers are usuall

What are the benefits of incremental model, What are the Benefits of increm...

What are the Benefits of incremental model This model is acceptable when there is less number of person involved in the project. Technical risks can be handle with every

What are the drawbacks of rad model, Question 1 . What are the drawbacks of...

Question 1 . What are the drawbacks of RAD Model Question 2 . Explain why reliability is more important than efficiency? Question 3 . What are the activities of funct

What is architectural evolution, What is architectural evolution? Archi...

What is architectural evolution? Architectural evolution is the method of changing a system from a centralized architecture to a distributed architecture as client server.

Differentiate between circuit switching and packet switching, Question: ...

Question: (a) Differentiate between circuit switching and packet switching. (b) Using an example, explain the main parts that form a URL (Uniform Resource Locator). (c)

Race condition, what is race condition?explain in detail.

what is race condition?explain in detail.

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