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 review, What is Review? Ans) A method or meeting during which a ...

What is Review? Ans) A method or meeting during which a work product or set of work products, is shown to project personnel, managers, users, customers, or other interested part

Assignment projects, I want to make assignements regarding software enginee...

I want to make assignements regarding software engineering.

What are the demerits of spiral model, What are the demerits of spiral mode...

What are the demerits of spiral model? i. It is depends on customer communication. If the communication is not suitable then the software product that gets developed will not r

Factory method, For this assignment you will create a program called MMWord...

For this assignment you will create a program called MMWordFix (Multi-Mode WordFix). This program prompts the user to select one of three word filters (uppercase, lowercase, encryp

What is throw-away prototyping, Throw-away prototyping Objective: ...

Throw-away prototyping Objective: The principal objective of this model is to validate or to derive the system needs. It is developed to decrease requirement risks.

Explain top down design, Top down design: A top down design approach begin...

Top down design: A top down design approach begins by identifying the main modules of the system, decomposing them into their lower level modules and iterating unless the desired

Explain the use of scm process, Question 1 Explain the origin of the defec...

Question 1 Explain the origin of the defect distribution in a typical software development life cycle Question 2 Explain the concept of quality Question 3 Explain the contents

Explain productivity and difficulty, Productivity and difficulty Produ...

Productivity and difficulty Productivity refers to metrics and measures of output from production processes, per unit of input. Productivity P may be conceived of as a metric

What is the best effort estimation for software phases?, Hello, I am a CS ...

Hello, I am a CS graduate and i just got a new job in a software development company. My boss assigned me to come up with what he called "the perfect pie chart" basically he says

Systems Design Lifecycle, What is the development lifecycle? Why is it usef...

What is the development lifecycle? Why is it useful? Describe the activities carried out at each stage Determination of scope Requirements specification Design Coding Testing Maint

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