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 do you mean by polymorphism, Q. What do you mean by Polymorphism? ...

Q. What do you mean by Polymorphism? Polymorphism:- Polymorphism includes the ability to use the same message to objects of different classes and have them behave differently.

What is procedure, What is Procedure? Ans) The step-by-step method follo...

What is Procedure? Ans) The step-by-step method followed to make sure that standards are met.

What is software verification, What is software verification? Ans) In ge...

What is software verification? Ans) In general the demonstration of consistency, completeness, and correctness of the software at every stage and between every stage of the deve

Define the load address for the first word of the program, Define the Load ...

Define the Load address for the first word of the program is known as Load address origin is called as a Load address for the first word of the program

What is the impact of "information era., Software Engineering 1. What i...

Software Engineering 1. What is the impact of "information era"? 2. Illustrate whether the linear sequential model of the software process is an accurate reflection of softw

Explain v- diagram, Normal 0 false false false EN-IN ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Define evolutionary prototyping, Evolutionary prototyping: Evolutionary Pr...

Evolutionary prototyping: Evolutionary Prototyping (also called as breadboard prototyping) is quite dissimilar from Throwaway Prototyping. The main goal when using Evolutionary Pr

List flaws in waterfall model, List flaws in waterfall model. - The big...

List flaws in waterfall model. - The biggest drawback is that you don't test the application logic until very late in development cycle. - Though a detailed system specifica

What is a modular system, What is a modular system? A modular system h...

What is a modular system? A modular system having of well defined manageable units to well defined  interfaces between them.

What is entity, What is Entity  It is most elementary thing of an organ...

What is Entity  It is most elementary thing of an organisation about which data has to be maintained. Each entity has unique identity. It's represented by rectangular box with

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