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

Explain the sauers model, Question 1: a) Describe the various activitie...

Question 1: a) Describe the various activities and or processes related to the development of Information systems. b) Using a diagram, show the several development processes

Write about the types of project plan, Write about the types of project pla...

Write about the types of project plan. Quality plan - This plan explains the quality procedures and standards that will be used in a project. Validation plan - This plan explai

Micro cds-isis application, Micro CDS/ISIS Application: In libraries t...

Micro CDS/ISIS Application: In libraries there are a number of repetitive operations. If one Miens the procedures for ordering, receiving, processing and circulating a book, o

What is error seeding, Define Error seeding? Ans) The process of intenti...

Define Error seeding? Ans) The process of intentionally adding called as faults to those already in a computer program for the purpose of monitoring the rate of recognition and

Pl sql, The company wants to offer an incentive of free shipping to those c...

The company wants to offer an incentive of free shipping to those customers who have not returned for two months. Create a procedure named PROMO_SHIP_SP that determines who these c

Determine the system evolution of life cycle process, System evolution of l...

System evolution of life cycle process The lifetime of verge systems is too long. They must evolve to meet change requests. The evolution may be expensive. Existing sy

Explain iterative enhancement model, Q. Explain Iterative Enhancement model...

Q. Explain Iterative Enhancement model? This model incorporates modification in the software based on the analysis of the existing system. As well the complete documentation of

What is embedded system partitioning, Question : (a) What is embedded s...

Question : (a) What is embedded system partitioning? What is decided during partitioning? (b) What is the difference between structural and functional partitioning? Which on

Modular software development, After studying the module you should understa...

After studying the module you should understand the principles and techniques associated with modular software development. After studying the module you should understand the c

Explain usability testing, Usability testing is testing of 'user-friendline...

Usability testing is testing of 'user-friendliness'. User interviews, surveys, video recording of user sessions and other methods can be used. Programmers and developers are usuall

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