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

Oop, create a class rectangle

create a class rectangle

Explain quality control, What is Quality control? This includes checkin...

What is Quality control? This includes checking the software development process to ensure that procedures and standards are being followed. There are two approaches to qual

Waterfall model is more advantageous than adhoc methods, Explain why waterf...

Explain why waterfall model is more advantageous than adhoc methods.      Ad-hoc Process Models- "Process capability is unpredictable due to the software process is constantly

Find the degree of capability of software reliability model, Q. Define capa...

Q. Define capability. What are the quantities that determine the degree of capability of a software reliability model? Ans: Capability demotes to the ability of the model to

Explain the software scope, Define software scope. The first software p...

Define software scope. The first software project management activity is the determination of software scope. Scope is defined answering the following questions. Context: Wh

Iterative Enhancement Model, what is the advantage of Iterative Enhancement...

what is the advantage of Iterative Enhancement Model in developing a system?

Java, how to get values from list

how to get values from list

Determine the working of developer of software, Determine the working of de...

Determine the working of developer of Software As developer of Software and user of Software became separate organisation, business concepts such as software costing, Software

Define design process, Define design process. Design process is a seque...

Define design process. Design process is a sequence of steps carried by which the requirements are translated into a system or software 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