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

Search of Innovative idea, Hello! It is being stated that i m the student o...

Hello! It is being stated that i m the student of Software Engineering and i am in found of an innovative FYP idea ,that has not been implemented yet. kindly tell me some newer ide

What is equivalence partitioning, Q. What is Equivalence Partitioning? ...

Q. What is Equivalence Partitioning? Equivalence Partitioning:-Equivalence partitioning is black box testing method that divides the input domain of a program into classes of d

Define debugging, Define debugging. Debugging is explained as the proce...

Define debugging. Debugging is explained as the process of removal of defect. It happens as a consequence of successful testing

What is the purpose of symbol table, Problem 1 . What is the purpose of Sym...

Problem 1 . What is the purpose of Symbol Table? Write a brief note on various Data structures used in implementing Symbol Tables Stating Purpose Writing note on various D

Techlib plus - microcomputer based software package, TECHLIB Plus microcomp...

TECHLIB Plus microcomputer based software package: This is yet another comprehensive package based on BASIS plus, one of the world's leading Document DBMS and Text Retrieval S

What are basic key process areas in cmm, Q. What are basic Key process area...

Q. What are basic Key process areas in CMM? Ans) Key Process Areas (KPAs) adds the areas an organization could focus to improve its software process to the next level. Except f

Ms project, what is meant by gantt chart who gave the name who is the found...

what is meant by gantt chart who gave the name who is the founder

Describe the importance of function point, Q. Describe the Importance of fu...

Q. Describe the Importance of function point? - This is independent of the languages tools or else methodology used for implementation. - They are able to be estimated from

implicit and explicit conceptual model, difference between implicit and ex...

difference between implicit and explicit conceptual model

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