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 about spiral model, Q. Explain about Spiral Model? The Spiral m...

Q. Explain about Spiral Model? The Spiral model is one of the well-liked model used for large projects. This model was projected by Boehm in 1988 and it focuses on minimizing t

Mobile application, we got the code for mobile app we need a document for t...

we got the code for mobile app we need a document for that

Classify the techniques into dynamic or static, Classify the below techniqu...

Classify the below techniques into dynamic or static. i. Data Flow Analysis. ii. Use Case Testing. iii. Equivalence Partitioning. iv. Exploratory Testing. v. Inspec

Write short note on black box testing, Write short note on black box testin...

Write short note on black box testing. The black box testing is also known as behavioural testing. This method fully focuses on the functional requirements of the software. Te

What are the problems of prototyping, What are the Problems of Prototyping ...

What are the Problems of Prototyping  In some organisations, theprototyping isn't as successful as anticipated. A common problem with this approach is that people expect much

Nature of roots of a quadratic equation, Consider a program for the purpose...

Consider a program for the purpose of the nature of roots of a quadratic equation. Its input is the triple of positive integers say a, b, c as well as values in the interval [0,100

Explain test archiving systems, Q. Explain Test archiving systems? Tes...

Q. Explain Test archiving systems? Test archiving systems: the goal is to keep follow of series of tests ant to act as the basis for documenting that the tests have been done

What are the task involved in design process of sdlc, What are the task inv...

What are the task involved in design process of SDLC General tasks involved in the design process are the following: i)  Design various blocks for overall system processes.

Determine the process of software coding, Determine the process of software...

Determine the process of software Coding The input to coding phase is the SDD document. In this stage, design document is coded according to module specification. This phase t

Demonstrate about analysis and design of a software system, Aim The aim...

Aim The aim of this Assignment is to demonstrate knowledge about the analysis and design of a  software  system  and  understanding  of  the  application  of  an  object-orient

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