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 validation and verification testing, Explain Validation and verific...

Explain Validation and verification testing? Ans) Used as an entity to describe a procedure of review, analysis, and testing all over the software life cycle to discover errors,

Determine the types of static testing tools, What are the types of static t...

What are the types of static testing tools? There are three types of static testing tools. Code based testing tools - These tools utilize source code as input and generate t

Data dictionary , data dictionary of online banking system

data dictionary of online banking system

Role of measurement in software engineering, Question: (a) (i) Describ...

Question: (a) (i) Describe briefly the role of measurement in software engineering. (ii) List three types of entities, their attributes and related measures in software eng

Extracting caracthers orplate recognition on Metlab, how to extract the cha...

how to extract the characters from the car plate image to car plate recognition. Matlab code

User and system documentation with examples, User documentation consist des...

User documentation consist descriptions of the functions of a system without reference to how these functions are implemented. Instances are installation guide and reference guide.

Illustrate detailed cocomo model, Q. Illustrate Detailed COCOMO model? ...

Q. Illustrate Detailed COCOMO model? Detailed COCOMO it incorporates all characteristics of the intermediate version with an assessment of the cost driver's impact on every ste

Connectivity Issue in Asp.net, Sir, our project is not connecting with SQL ...

Sir, our project is not connecting with SQL server. How to insert own created database in ASP.net

Srs, Why is SRS document known as black box specification of a system

Why is SRS document known as black box specification of a system

Data dictionary, What is data dictionary entry explain

What is data dictionary entry explain

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