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

Software development, SOFTWARE DEVELOPMENT: Software development is a ...

SOFTWARE DEVELOPMENT: Software development is a human activity. It involves a clear understanding of the field of application, such as library and information science; knowled

Explain exploratory testing, Explain exploratory testing. - In explorat...

Explain exploratory testing. - In exploratory testing approach testers are included in minimum planning and maximum test execution. - The planning contains creation of a tes

Explain metrics assumptions of software metrics, Explain Metrics assumption...

Explain Metrics assumptions of Software metrics Software metrics A software property can be calculated. The relationship exists among what we can measure and what we

What is a process modeling and management tool, What is a process modeling ...

What is a process modeling and management tool? Process modeling and management tools are used to show the key elements of a process so it can be better understood. Such tools

What is grey box testing, Grey box testing is a software testing method tha...

Grey box testing is a software testing method that uses a combination of black box testing and white box testing. Gray box testing is not the black box testing, because the tester

Ftr, EXPLAIN ABOUT DEFECT AMPLIFICATION AND REMOVAL IN SOFTWARE ENGINEERING...

EXPLAIN ABOUT DEFECT AMPLIFICATION AND REMOVAL IN SOFTWARE ENGINEERING

What is stress testing, What is Stress testing - It checks the robustn...

What is Stress testing - It checks the robustness of application. - It verifies that application consistently provides satisfactory performance under unfavourable and extre

What is configuration management, What is configuration Management? Sof...

What is configuration Management? Software Configuration management (SCM) is the task of tracking and controlling alters in the software. Configuration management practices con

How the case tools are classified, How the CASE tools are classified? C...

How the CASE tools are classified? CASE tools can be classified by A. By function or use B. By user type(e.g. manager,tester),or C. By stage in software engineering pr

Local data object defined in a subroutine, It is possible to assign a local...

It is possible to assign a local data object defined in a subroutine or function module to a field group. False.

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