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

State the coding standards, State the Coding standards Coding standar...

State the Coding standards Coding standards normally give the guidelines about following: i)  Name of the module ii)  External and Internal documentation of source code

What is boundary value analysis, Q. What is Boundary Value Analysis? B...

Q. What is Boundary Value Analysis? Boundary Value Analysis: It is extensively recognized that input values at the extreme ends of input domain cause more errors in system. M

Determine the process of software coding, Determine the process of software...

Determine the process of software Coding The input to coding phase is the SDD document. In this stage, design document is coded according to module specification. This phase t

State sandwich testing, Define sandwich testing. Testing combines the i...

Define sandwich testing. Testing combines the ideas of both bottom-up and top-down testing by defining a certain target layer in the hierarchy of the module. The modules below

Illustrate partitioning in stepwise refinement, Q. Illustrate Partitioning ...

Q. Illustrate Partitioning in stepwise refinement? Problems are frequently too large and complex to be understood as a whole. Therefore we tend to partition such problems into

What is process improvement, What is Process improvement? Understanding...

What is Process improvement? Understanding existing processes and introducing process changes to improve product quality, decrease costs or accelerate schedules. Most proces

The roles of project stakeholders, The roles of project stakeholders :- ...

The roles of project stakeholders :- Offer resources (time, money, ...) to the project team Instruct developers about their business Be precise and specific about requir

What is test methodology, Test methodology is up to the end client, and can...

Test methodology is up to the end client, and can be used, reused, and moulded to your end client's requirements. Rob Davis believes that using the right test methodology is signif

What is meant by software change, What is meant by software change? Sof...

What is meant by software change? Software change is explained as the change in nature of software as the needs of software changes.

What does verification represent, What does Verification represent? Ver...

What does Verification represent? Verification shows the set of activities that are carried out to confirm that the software correctly executes the specific functionality.

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