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 are the controlling events between objects, What are the Controlling E...

What are the Controlling Events Between Objects Event is the specification of a important occurrence which has a location in time and space. Examples of events are flight l

Explain length of code - software metrices, Explain Length of code This...

Explain Length of code This is a measure of the size of a program. Usually, the larger the size of the code of a component, the more difficult and error-prone that component is

What is black box and white box testing techniques, Software Project Manage...

Software Project Management 1. What is black box and white box testing techniques? 2. Describe different roles of the software development? 3. List out different project

Waterfall model is more advantageous than adhoc methods, Explain why waterf...

Explain why waterfall model is more advantageous than adhoc methods.      Ad-hoc Process Models- "Process capability is unpredictable due to the software process is constantly

Define archives as records and explain their importance, QUESTION 1 (a)...

QUESTION 1 (a) Define "archives" as records and explain their importance. (b) Elaborate on the steps archivists have to undertake for the storage of archival records. QU

Software engineer, Differance b/w Liner sequenrial modal with incremental m...

Differance b/w Liner sequenrial modal with incremental modal

Define the stress testing, Define the Stress testing: - It checks the r...

Define the Stress testing: - It checks the robustness of application. - It verifies that application consistently gives satisfactory performance under unfavorable and extrem

Explain real time system, What is a Real time system? Real time system ...

What is a Real time system? Real time system is a software system in which the correct functionalities of the system are dependent upon results formed by the system and the tim

Define the quality control, Quality Control Quality control is a method...

Quality Control Quality control is a method in which the product's quality is compared with standards and corrective actions taken if needed. Quality control activities focus o

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