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 requirement traceability matrix, Requirement traceability matrix ...

Requirement traceability matrix RTM is a matrix tying up needs with the testcases. It is a way of making sure that each requirement has a corresponding testcase which will be t

Define data dictionary, Define Data Dictionary The data dictionary can ...

Define Data Dictionary The data dictionary can be explained as an organized collection of all the data elements of the system with precise and rigorous definitions so that user

Define the structural testing, Q. Define the Structural Testing? For a ...

Q. Define the Structural Testing? For a moment it called white-box testing. At this point derivations of test cases are according to the program structure. Knowledge of the pro

Open source software, what are the advantages of open source software?

what are the advantages of open source software?

What are the elements of design model, What are the elements of design mode...

What are the elements of design model? i. Data design ii. Component-level design iii. Interface design iv. Architectural design

Information engineering, Information engineering is a system  engineering ...

Information engineering is a system  engineering approach which is used to describe architectures which enable a business to use data professionally. The intent of information eng

How many types of traceability in software engineering, How many types of t...

How many types of traceability in software engineering? i. Source traceability - These are generally the links between requirement to stakeholders who suggests these requiremen

Explain change control, Problem 1 Explain change control? Write down th...

Problem 1 Explain change control? Write down the steps followed for change control Problem 2 Explain the concept of Baselines with reference to software configuration m

Give detail discussion about black box testing, Give detail discussion abou...

Give detail discussion about Black box testing. Black box or behavioural testing emphasis on the functional needs of the software. It is used during the last stage of tes

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