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

Online bakery-equipments ordering system, Question: Draw a class diagra...

Question: Draw a class diagram which represents the information handled by the Online Bakery-equipments Ordering System. Your class should briefly and simply reflect the relat

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 are the prototyping approaches in software process, What are the proto...

What are the prototyping approaches in software process? i. Evolutionary prototyping - In this approach of system development, the initial prototype is prepared and it is then

Stats free, system architecture block diagram

system architecture block diagram

Describe software maintenance and it types, Software Engineering 1. Giv...

Software Engineering 1. Give the two roles of the software process. 2. Describe software maintenance and it types. 3. What is RAD model and its phases? 4. What do you

Why software design improve when we use oops concepts, Q. Why does the soft...

Q. Why does the software design improve when we use object-oriented concepts? Ans. The software design gets betters when we use object-oriented concepts because 1.Object-o

Explain regression testing, Regression test cases which a program has previ...

Regression test cases which a program has previously implemented correctly in order to detect errors spawned by changes or corrections done during software development and maintena

Why it is difficult to improve software process, List four reasons why it i...

List four reasons why it is difficult to improve software process.   It is difficult to improve software process due to following reasons: 1. Lack of knowledge 2. Not eno

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