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

Describe the implementation of new technology, Question 1: Prepare a sh...

Question 1: Prepare a short note on technology strategy. Explain in brief about the innovation management. Question 2: What is Research and Development (R&D), and how i

What is fault, A manifestation of an error in software. A fault, if encount...

A manifestation of an error in software. A fault, if encountered, might cause a failure.

Calculates function point value for a project, Q Calculates function point ...

Q Calculates function point value for a project with the following domain characteristics: No. of I/P = 30 No. of O/P = 62 No. of user Inquiries = 24 No. of fil

Explain inputs, Products, services, or information required from suppliers ...

Products, services, or information required from suppliers to make a process work.

Aggregation between objects, Aggregation between objects Aggregation am...

Aggregation between objects Aggregation among objects shows a relationship. It is a whole/part relationship. Aggregation might be implying containment.

Explain the length of identifiers, Explain the Length of identifiers L...

Explain the Length of identifiers Length of identifiers :-  This is a measure of the average length of separate identifiers in a program. The longer the identifiers, the more

Write sql code to make the changes, Assuming that all the tables have been ...

Assuming that all the tables have been created as given in the relational schema, write SQL code to make the following changes in the structure of the tables: (i) Make the empl

Illustrate exploratory testing, Illustrate exploratory testing. - In ex...

Illustrate exploratory testing. - In exploratory testing approach testers are involved in maximum test execution and minimum planning. - Planning includes creation of a test

What is meaning of attributes, Attributes   Attribute is a characteri...

Attributes   Attribute is a characteristic or property of an entity which is of interest to the organisation. It's represented by oval shaped box with name of attribute writt

Define evolutionary prototyping, Q. Define Evolutionary prototyping? Ev...

Q. Define Evolutionary prototyping? Evolutionary Prototyping is also known as breadboard prototyping is quite different from Throwaway Prototyping. The major goal when using Ev

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