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 system engineering, What is System Engineering? System Engineer...

What is System Engineering? System Engineering means designing, executing, deploying and operating systems which contain software, hardware, and people.

Time Line Chart for Online Shopping Management , Sir I need a Basic Ready m...

Sir I need a Basic Ready made Time Line Chart for Online Shopping Management Project Because I have to submit the Project Report on 8 April 2013 So can u provide some urgent help n

What is data flow analysis, What is Data Flow Analysis? Ans) Having of t...

What is Data Flow Analysis? Ans) Having of the graphical analysis of collections of (sequential) data definitions and reference patterns to verify constraints that can be placed

List the task regions in the spiral model, List the task regions in the Spi...

List the task regions in the Spiral model. Customer communication - In this region it is suggested to make customer communication. Planning - All planning activities are car

Define data dictionary, Define Data Dictionary The data dictionary can ...

Define Data Dictionary The data dictionary can be explained as an organized collection of all the data elements of the system with precise and rigorous definitions so that user

List some of the design principles, Mention some of the Design principles. ...

Mention some of the Design principles. a.    The design process should not suffer from tunnel vision. b.    The design should not reinvent the wheel. c.     The Design sh

Determine in detail about waterfall model, Determine in detail about Waterf...

Determine in detail about Waterfall model Waterfall model provides a sequential and systematic approach to software development and is better than build and fix approach. Howev

What are the advantages of horizontal partitioning, What are the advantages...

What are the advantages of horizontal partitioning? i. Software is must be easy to check. ii. Software is handy to maintain. iii. Create fewer side effects. iv. Softwa

#title.help with labs for Rabbit 4000, I need help two thing 1-understand h...

I need help two thing 1-understand how can I programme rabbit 4000 2- do labs set for Rabbit 4000

Explain rad model, RAD Model Rapid Application Development Model is...

RAD Model Rapid Application Development Model is the part of incremental model. Achieves the high speed development using component based construction. Phases

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