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

DFD AND DATA DICTIONARY, Hoosier Burger''s food ordering system dfd and dat...

Hoosier Burger''s food ordering system dfd and data dictionary

What is function points, Q. What is Function points? Function points :...

Q. What is Function points? Function points : Function point calculates the functionality from the user opinion that is on the basis of what the user request and receives in r

Modified er diagram representing cardinalities, Modified ER diagram represe...

Modified ER diagram representing cardinalities When minimum cardinality of a relationship is one, then second entity is known as mandatory participant in the relationship. Ma

Test a system though there is no documentation available, You need to test ...

You need to test a system though there is no documentation available and developers who developed it don't work there anymore. What would you do? - We will perform exploratory

How to ensure the smooth implementation of system, Probelm: (a) Compare...

Probelm: (a) Compare Supply Chain Management (SCM) and Customer Relationship Management (CRM) . How are they similar? How are they different? Your answer should show the differ

Develop a software architecture, Develop a software architecture for the Ca...

Develop a software architecture for the Case Study.   a. Identify the major 'design forces' () affecting the system, and discuss the 'architectural response' you think most   ap

Explain lines of code (loc), Lines of code (LOC) is a software metric used...

Lines of code (LOC) is a software metric used to calculate the size of a software program by counting the number of lines in the text of the program's source code. LOC is typicall

What is software maintenance and cocomo model, What is software maintenance...

What is software maintenance? Software maintenance is a set actions in which program are customized after it has been put into use. COCOMO model :- COnstructive COst MOd

What is technical review, A technical review is the review that refers to c...

A technical review is the review that refers to content of the technical material being reviewed.

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