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

Software decompositiopn, what is software decomposition? what are its techn...

what is software decomposition? what are its techniques?

What is customer (end user), What is Customer (end user)? Ans) The organ...

What is Customer (end user)? Ans) The organization or individual, internal or external to the producing organization that takes the product.

What are the aims of testing, What are the aims of testing? i. T...

What are the aims of testing? i. Testing is a process of executing a program with the target of finding an error. ii. A good test case is one that has high possibilit

Write the problems with the cmm, Write the Problems with the CMM. Prac...

Write the Problems with the CMM. Practices associated with model levels Companies could be using practices from dissimilar levels at the same time but if all practices

Explain the working of gantt charts, Explain the working of Gantt charts ...

Explain the working of Gantt charts -  Gantt charts enable emailing of project/tasks info to others automatically -  Gantt charts allow use of intranet/email facility to down

Determine the structure of design concepts, Structure of design It ...

Structure of design It allows the decomposition of a large system into smaller, more manageable units with well explained relationships to the other units in a system. N

What is the meaning of requirement engineering, What is the meaning of requ...

What is the meaning of requirement engineering? Requirement engineering defined as the process of setting up the services that the customer requires from the system and the co

What is test methodology, Test methodology is up to the end client, and can...

Test methodology is up to the end client, and can be used, reused, and moulded to your end client's requirements. Rob Davis believes that using the right test methodology is signif

Define software testing, Define software testing? Software testing is a...

Define software testing? Software testing is a critical element of software quality assurance and shows the ultimate review of specification, design, and coding.

Object Oriented modelling, Perform analysis and design of the Vehicle Contr...

Perform analysis and design of the Vehicle Control Unit software using UML, and document all results obtained from each of the following tasks: 1. Requirements analysis including:

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