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

What is project scheduling, Question 1 What is project management? Explain...

Question 1 What is project management? Explain various activities involved in project management Question 2 Describe the following with respect to Estimation and Budgeting of

What is detailed COCOMO model, Q. What is Detailed COCOMO model ? The d...

Q. What is Detailed COCOMO model ? The detailed COCOMO model is able to estimate the staffing cost and duration of each of the subsystem, development phases and modules. It per

What is cause-effect graphing, A testing method that aids in selecting, in ...

A testing method that aids in selecting, in a systematic way, a high-yield set of test cases that logically relates causes to effects to produce test cases. It has a useful side ef

Describe the implementation of new technology, Question 1: Prepare a sh...

Question 1: Prepare a short note on technology strategy. Explain in brief about the innovation management. Question 2: What is Research and Development (R&D), and how i

Design test cases for loop testing, Q. Regard as a program that reads a set...

Q. Regard as a program that reads a set of Data for 'n' no. of triangles. The program reads three integer values like representing the sides of triangles. The program prints for ea

Different characteristics of software measures, Different characteristics o...

Different characteristics of software measures Different characteristics of software measures identified by Basili (1989) are given below: • Objects of measurement: They i

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

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