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

Describe incremental model, Q. Describe incremental model? Define core prod...

Q. Describe incremental model? Define core product and detailed plan. Ans. The incremental model is proposed by D.L PARNAS. It is basically implemented by combining elements

Case study : online bookshop system, A major book retailer is planning to d...

A major book retailer is planning to develop a computer system to handle their new online bookshop: BooksUniverse.com. You have been chosen to do the analysis and design using Obje

Neural network logo recognition, java/python based application which lets y...

java/python based application which lets you upload images of car logos and detects which logo it is by outputting the ID number of that image. Neural network is used to achieve th

Evaluate the total costs for johns project, Question: (a) Show two mai...

Question: (a) Show two main approaches to identify risk in a project. (b) John finds that IOE recovers some overheads as oncosts on direct staff costs although others are

What are the characteristics of the software, What are the characteristics ...

What are the characteristics of the software?  Software is engineered, not manufactured.  Software does not wear out.  Most software is custom built rather than being ass

Illustrate about web-testing, Illustrate about web-testing - Web testin...

Illustrate about web-testing - Web testing is software testing concentrating on web applications. - It assists in addressing issues before making the application live to pub

Explain abstraction, Abstraction :- Abstraction allows one to concentrate o...

Abstraction :- Abstraction allows one to concentrate on a problem at some level of generalization without regard to irrelevant low level details; use of abstraction also allows one

What is stochastic testing, Stochastic testing is the similar as "monkey te...

Stochastic testing is the similar as "monkey testing", but stochastic testing is a lot more technical sounding name for the similar testing process.

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 change management tools, What is Change management tools? Chang...

What is Change management tools? Change management is a process in which it can be modelled and integrated with a version management system. Change management tools Fo

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