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

Advantages and disadvantages of business intelligence, 1) Case A...

1) Case Analysis (maximum of 6 pages per case, double spaced) The following format may be used as a guideline for Case Analysis: Key Issues Identified in Case Sta

FTR., Formal technical review in railway reservation system

Formal technical review in railway reservation system

Explain the types of software testing, Explain the types of software testin...

Explain the types of software testing. Unit testing Integration testing System testing User-acceptance testing End-to-End testing Exception testing

System Analysis and Design, Hello Sir, i want help in my assignment. UNIT n...

Hello Sir, i want help in my assignment. UNIT name: System analysis and design

What are the various testing activities, What are the various testing activ...

What are the various testing activities? i. Test planning ii. Test execution iii. Test case design iv. Data collection v. Effective evaluation

Explain in detail about software maintenance, Explain in detail about softw...

Explain in detail about software Maintenance. Software maintenance is an action in which program is modified after it has been put into use. Maintenance is termed as the

What specific languages can be used in srs, What specific languages can be ...

What specific languages can be used in SRS? Requirement specification necessitates the use of some order language. The language should support the desired qualities of the SRS-

Software management, i have coursework on software management and dont know...

i have coursework on software management and dont know how to go about it. I want to find out if you will be able to help me on that. The task is to investgate(research informed pa

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