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

Determine the use of architectural design, What is the use of Architectura...

What is the use of Architectural design? The Architectural design defines the relationship between major structural elements of the software, the "design patterns" that may be

How is the state diagram helpful to an engineer, Problem: a) Assume a w...

Problem: a) Assume a washing machine. List all possible states of the washing machine. Draw a state diagram showing also the events triggering the change of states where poss

What are the tools used in system analyst, What are the Toolsused in system...

What are the Toolsused in system analyst Systems analyst have numerous tools to help them in carrying out their work. As many of their projects are for big companies it is ess

Use cases, 1. Perform a requirements analysis for the Case Study. Express t...

1. Perform a requirements analysis for the Case Study. Express the results using the following artefacts:     a. A use case diagram for the functional requirements of the entire

What is cm plan, What is CM plan? Explain the types of documents to be ...

What is CM plan? Explain the types of documents to be managed and a document naming scheme. Explain who takes responsibility for the CM procedures and creation of baselines.

State the primary objectives of analysis model, State the primary objective...

State the primary objectives of analysis Model. To explain what the customer needs To set up a basis for the creation of a software design To explain a set of requirem

What are the demerits of spiral model, What are the demerits of spiral mode...

What are the demerits of spiral model? i. It is depends on customer communication. If the communication is not suitable then the software product that gets developed will not r

How software metrics is beneficial for sfotware engineer, How software metr...

How software metrics is beneficial for sfotware engineer Using software metrics, software engineer measures software processes and requirements for that process. Software measu

What is criticality, What is Criticality? The degree of impact that a ne...

What is Criticality? The degree of impact that a necessity, module, error, fault, failure, or other item has on the operation of a system or development.

Define object in software engineering, Q. Define Object in Software Enginee...

Q. Define Object in Software Engineering? Object:- An object is something which is capable of being seen, touched or sensed. Each object has certain distinctions or attributes

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