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

Explain the difference between latent and masked defect, Explain the differ...

Explain the difference between Latent and Masked Defect. Latent Defect is one which has been in the system for a long time; but is discovered now. I.e. A defect which has been

Explain the prototyping approaches in software process, Explain the prototy...

Explain the prototyping approaches in software process. Two approaches i. Evolutionary prototyping - In this approach of system development, the initial prototype is prepare

Explain the reuse maintenance model, Q. Explain the reuse maintenance model...

Q. Explain the reuse maintenance model with the help of a diagram. Ans: Recycle maintenance model this model is based on the principal that maintenance could be viewed as an

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

Different server platforms for erp systems, Question: a. Assume that yo...

Question: a. Assume that you have three similar projects, and, in each, the ratios of problems found during system test versus first year in the field have been 1.5, 1.2, and

Explain the working of gantt charts, Explain the working of Gantt charts ...

Explain the working of Gantt charts -  Gantt charts enable emailing of project/tasks info to others automatically -  Gantt charts allow use of intranet/email facility to down

Define top-down testing, Define top-down testing. System developed star...

Define top-down testing. System developed starting from most general modules. Testing begins from the most general module.

What is data dictionary, Q. What is Data Dictionary? Ans Data dicti...

Q. What is Data Dictionary? Ans Data dictionary is a stockroom of data giving information about data. It is a list of terms as well as their definition for all data items a

Cds - isis software, CDS/ISIS Software (Micro Version): Micro CDS/ISIS...

CDS/ISIS Software (Micro Version): Micro CDS/ISIS is an advanced non-numerical information storage and retrieval software package. It was developed by UNESCO in 1985 to meet t

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