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 are task regions in the spiral model, What are task regions in the Spi...

What are task regions in the Spiral model. Customer communication - In this region it is recommended to establish customer communication. Planning - All planning doings are

Determine the repeatable level of maturity model, Level 2 (Repeatable) ...

Level 2 (Repeatable) Organisation satisfies all the requirements of level-1. At this stage, basic project management policies and associated procedures are established. Insti

Design a digital system to produce a pwm , Task You have to design a d...

Task You have to design a digital system to produce a PWM signal that produces pulses at a frequency in the range 50 Hz -100 Hz . The pulses will be between 1 ms and 2 ms du

Software Quality Assurance - Defect Amplification and Remova, Errors from p...

Errors from previous stage Errors passed through Amplified errors Newly generated errors Errors passed to next stage Testing phase of project-A 35 35 0 5 20 Testing phase of Projec

E-R diagram, Draw an E-R diagram for the following situation: an account is...

Draw an E-R diagram for the following situation: an account is a relationtion between cutosmer and bank. A customer had a name.

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

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

Driven development, what is driven development?give example what benifit of...

what is driven development?give example what benifit of driven development

What is meant by software prototyping, What is meant by software prototypin...

What is meant by software prototyping? Software prototyping is a process of creating a model for the software product. This is developed based on the currently known requiremen

Draw a memory map for a system, Draw a memory map for a system with a memor...

Draw a memory map for a system with a memory capacity of 256MB. Each memory location in the system is 8 bits. Assume the system has one 4 MB memory block used as ROM residing at th

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