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

Program to simulate protein synthesis from dna, Overview In this assig...

Overview In this assignment, your program will simulate protein synthesis from DNA. Speci_cally, it reads a DNA string from a file specified on the command line, synthesizes th

Computer science, Write a report that explains the agile principles for rap...

Write a report that explains the agile principles for rapid software development, and recommend and justify an appropriate method for adoption.

Compare rmi and corba from a middleware perspective, QUESTION - RMI (a...

QUESTION - RMI (a) Figure illustrates an RMI communication.                                      Describe the role of each component in the RMI. (b) Explain the ter

What is walk-through, A walk-through is an informal meeting for information...

A walk-through is an informal meeting for informational purposes or evaluation.

Illustrate function-oriented metrics, Q. Illustrate Function-oriented metri...

Q. Illustrate Function-oriented metrics? Function-oriented metrics: Function-oriented software metrics utilize a measure of the functionality delivered by an application as a

Explain reverse engineering, REVERSE ENGINEERING :- It is a process of exa...

REVERSE ENGINEERING :- It is a process of examining software with a view to understanding its design and specification. In this, source code and portable code are the input

Explain configuration management, Configuration management (CM) covers the ...

Configuration management (CM) covers the tools and procedure used to control, coordinate and track code, needs, documentation, problems, change requests, designs, tools, compilers,

Software requirments, #questionFrame Diagrams We discussed the importance o...

#questionFrame Diagrams We discussed the importance of framing a problem in order to understand the problem better and be able to develop a solution more quickly and easily. In thi

What is requirements engineering, What is Requirements Engineering Req...

What is Requirements Engineering Requirements engineering is systematic use of proven techniques, principles and language tools for cost effective analysis, on-going evaluatio

What is software life cycle, Software life cycle starts when a software pro...

Software life cycle starts when a software product is first conceived and ends when it is no longer in use. It contains aspects such as initial concept, requirements analysis, inte

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