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 inheritance, Q. What is Inheritance? Inheritance:- Inheritance...

Q. What is Inheritance? Inheritance:- Inheritance is defined as the property of objects by which instances of a class can have access to data and programs contained in a previ

Why testing is significant with respect to software, Why testing is importa...

Why testing is important with respect to software? A testing process focuses on logical internals of software ensuring that all statements have been tested and all are function

What is integration testing and system testing, What is the difference in w...

What is the difference in writing the test cases for Integration testing and system testing? Integration testing is done at module level when lots of modules are integrated wit

Explain the software design process, What is the work product of software d...

What is the work product of software design process and who does this? A design model that encompasses architectural, component level, interface and their representations is t

What is meant by throw away prototyping, What is meant by Throw away Protot...

What is meant by Throw away Prototyping? Giving the user a system which is incomplete and then changing and augmenting it as the user requires become clear. The objective

E-R diagram, Draw an E-R diagram for the following situation: an account is...

Draw an E-R diagram for the following situation: an account is a relationtion between cutosmer and bank. A customer had a name.

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

Explain the different architectures developed during bpe, What are the diff...

What are the different architectures developed during BPE? Data architecture àframework for the information needs of a business. Application architecture à incorporates the

What is upwardly compatible software, "Upwardly compatible software" is sof...

"Upwardly compatible software" is software that is compatible with a later or more difficult version of itself. For example, an upwardly compatible software is able to occur files

Why do dns root servers hold entries for two-level, QUESTION - Name Service...

QUESTION - Name Services (a) Illustrate with help of a diagram the results of a DNS lookup and an ARP lookup assuming we are using IPv4. (b) Why do DNS root servers hold en

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