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 prototype, What is Prototype Prototype is developed so that cu...

What is Prototype Prototype is developed so that customers, developers and users can learn more about problem. Hence prototype serves as a mechanism for identifying software r

Design black box test suits for a function, Q. Design black box test suits ...

Q. Design black box test suits for a function that checks whether a character or string upto ten characters in a palindrome? Ans Following may be the test cases: - Try wit

Explain the software architecture, What is software architecture? The ...

What is software architecture? The software architecture of a program or computing system is the structure or structures of the system, which comprises software methods, the e

The phases of a problem solving loop, Problem solving is a critical skill f...

Problem solving is a critical skill for success in business—in fact it’s often what you are hired and paid to do. This article explains the five problem solving steps and provides

Information storage and retrieval software, INFORMATION STORAGE  AND RETRI...

INFORMATION STORAGE  AND RETRIEVAL SOFTWARE: IBM (International Business Machines Corporation) was one of the earliest to invest money to develop software packages intended fo

Define design process, Define design process. Design process is a sequ...

Define design process. Design process is a sequence of steps carried through which the requirements are translated into a system or software model.

What is a variant, What is a variant Ans) "Variants" are versions of a p...

What is a variant Ans) "Variants" are versions of a program.

Cs304, Following is the description of all data member and member functions...

Following is the description of all data member and member functions of respective classes: ? Data members for PropertyCategories: o SocietyName: This data member will be used

Pros and cons of adding audio directly to the timeline, Question: Audio...

Question: Audio and Video Integration in Flash MX 2004 Professional. What sound formats does Flash MX 2004 support? (incl. if you have Quicktime or later installed on your comp

Software development, SOFTWARE DEVELOPMENT: Software development is a ...

SOFTWARE DEVELOPMENT: Software development is a human activity. It involves a clear understanding of the field of application, such as library and information science; knowled

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