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

Cairs library management system , CARS-LMS: In this section let us try...

CARS-LMS: In this section let us try to learn about a different software package, which is commonly used in some of the libraries abroad. The package is known as CAIRS/LMS or

Explain information flow index, Q. Explain Information Flow index? Inf...

Q. Explain Information Flow index? Information Flow index Information flow metrics are practical to the components of a system design. For any component A We are able to defi

Process models, Ask question what is abstraction ?#Minimum 100 words accept...

Ask question what is abstraction ?#Minimum 100 words accepted#

Explain evolutionary prototyping, Evolutionary prototyping Objective: ...

Evolutionary prototyping Objective: The principal objective of this model is to deliver the working system to the end-user. Example-AI systems. Advantages

Data Flow Diagram, I need help creating a DFD for an assignment. Is there a...

I need help creating a DFD for an assignment. Is there anyway you could help?

Explain in detail about functional modelling, Explain in detail about Funct...

Explain in detail about Functional Modelling. This model explains the computations that take place within a system. This model is useful when the transformation from t

Importance of a document type definition in xml, Question: (a) Describe...

Question: (a) Describe the purpose and importance of a Document Type Definition in XML. (b) Describe the difference between PCDATA and CDATA with respect to a DTD. (c)

List the principles of a software design, List the principles of a software...

List the principles of a software design. i. The design process should not suffer from "tunnel vision". ii. The design should be traceable to the analysis model. iii. The

Least cot method, what are the steps to solving transportation cost with le...

what are the steps to solving transportation cost with least cost method

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