0% found this document useful (0 votes)
37 views4 pages

Method For Estimating Reusable Module in Object Oriented Program

This document discusses methods for estimating reusable modules in object-oriented programs. It defines different types of reuse, including public, private, leveraged, and verbatim reuse. It also outlines three perspectives for identifying reuse: server, client, and system. The document proposes an approach for identifying reusable modules that involves analyzing source code, calculating various metrics like weighted methods per class and cyclomatic complexity, and displaying the results to determine which source code is reusable.

Uploaded by

erpublication
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views4 pages

Method For Estimating Reusable Module in Object Oriented Program

This document discusses methods for estimating reusable modules in object-oriented programs. It defines different types of reuse, including public, private, leveraged, and verbatim reuse. It also outlines three perspectives for identifying reuse: server, client, and system. The document proposes an approach for identifying reusable modules that involves analyzing source code, calculating various metrics like weighted methods per class and cyclomatic complexity, and displaying the results to determine which source code is reusable.

Uploaded by

erpublication
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

International Journal of Engineering and Technical Research (IJETR)

ISSN: 2321-0869, Volume-1, Issue-5, July 2013

Method for Estimating Reusable Module in Object


Oriented Program
Nehil Rao Nirmal, Avinash Dhole,

Abstract Software Reuse increases the productivity and II. WHY REUSE IS IMPORTANT?
reduces the cost and improves the Quality of the software Many Organization and department, by increasing the level
development. Reusability is one of the most important of the software reuse, save the time and development cost
Quality Characteristic. Therefore it is necessary to measure taken to develop the software. U.S. Department saved 300
the reusability of the module in order to realize the reuse of million $ by increasing the 1% software reuse.[1] Reusability
module effectively. By reuse the module of existing software measurement is providing the way to build and identify the
has increased in past recent year which impact more on the reusable modules from existing program. Existing programs
software quality. Many measuring Reusability methods contain the knowledge and experience of the developers who
have been proposed for estimating the reusability of are expert in particular application domain. So if we extract
module. information from existing program which meet the needs of
the software organization then it is beneficial for the
Index TermsReusability, Modularity, Coupling, Cohesion,
organization.
Inheritance.
These are the some example where reuse helps
In Missile Systems Division (MSD) using the
software reuse concept it increased the 50%
I. INTRODUCTION
productivity.[3]
Reusability is the degree to which existing module or
component used in Software system or new project. Software American Navy uses the reusable modules which
Reuse reduces the cost, improves the quality and increases the reduce 26 % of labor required to develop and
productivity of the software development. Reusability is one maintain the Restructured Naval Tactical Data
of the quality characteristic. Therefore it is necessary to Systems (RNTDS).[4]
measure the reusability of the module in order to realize the Magnavox saw if we are using the reusable modules to
reuse of module effectively. The practice of reuse of existing develop the Force Fusion System Prototype (FFSP),
software has increased in recent years which have a great it reduces the 20% of the development time of
impact on the software quality. estimated time for developing the new system.[3]

Any Module can be reused in software development III. DEFINITION OF REUSE TYPES
process in two ways which are:
Bieman et als [9] defined the several types of reuse and
Reuse the module without modification: it is the extent of defined the three types of reuse in the three perspectives.
ease with which the existing module can be used in the new These are explained as follows:
development.
Reuse the module with modification: it is the extent to A) Public Reuse: Fenton define the public reuses as the
which some part of the module with modification can be proportion of a product which was constructed externally
reused in the development. [5].

If we reuse the oldest module which is already develop in Public reuse = length (E) / length (p);
new system it increase the productivity because effort of the
programme is reduce and it correctness is also increase E is the code developed externally. P is the new system
because the exist system already tested.. including E.
B) Private Reuse: Fenton defines private reuse (or perhaps
more appropriately internal reuse) as the extent to which
modules within a product are reused within the same product
[5]. Fenton uses the call graph which represents the flow
Manuscript received June 28, 2013
connection of the module .In these graphs node represents the
module and they are connected through edges. If one node
Nehil Rao Nirmal, Department of Computer Science & Engineering, calls another node then edge displays the connection between
Raipur Institute of Technology, Raipur, India them. Fenton provides the formula for calculating the private
Avinash Dhole, Department of Computer Science & Engineering,
reuse in call graph as follows: [2]
Raipur Institute of Technology, Raipur, India R (G) = e n + 1;

1 www.erpublication.org
Method for Estimating Reusable Module in Object Oriented Program

e is total no of edges in graph. And n is the number of the B. Weighted Method per Class (W.M.C.)
nodes in graph. This metrics is used for calculating the structure complexity
C) Leveraged Reuse: In Leveraged reuse means a of the programs. WMC is sum of complexity of the all
modification of reuse is allowed. [6][8] methods which is implemented in class. And method
D) Verbatim Reuse: In Verbatim reuse means a modification complexity is measured by using Cyclomatic Complexity.
of reuse is not allowed.[6][8] Suppose class is having the methods (m1, m2, and m3mn)
E) Direct Reuse: Direct reuse is reuse without using the and complexity of the methods are (c1, c2, and c3cn) then
intermediate entity. One module directly calls another WMC = c1+c2+c3+. +cn;
module.
F) Indirect Reuse: Indirect reuse is reuse through an Cyclomatic Complexity has foundation of the graph theory
intermediate entity. When first module calls second module and is computed in one of the 3 ways. [8]
and second module calls the third module then first module Number of regions in flow graph. Cyclomatic Complexity
indirectly calls the third module. defined in flow graph as follow
C (G) = E N +2;
Three Perspectives for reuse: Where E is the no. of the edge in the graph and N is the no. of
Bieman [9] provided the three perspective view for the nodes in graph. Cyclomatic Complexity defined in flow
identifying the reuse views. These are described as follows: graph as follow
Server Perspective: perspective of the library component C (G) = P+1;
known as a server perspective. Server reuse of the any class Where P is number of predicate nodes in the graph.
will characterize how one class is using the other class. Statement where we are taking some decision are called
Client Perspective: Client perspective means how one predicate node. An algorithm is given in figure-3.
particular entity is using the other entity i.e. how the new
system using the existing system.
System Perspective: it is the combination of the both server DIT = 0
perspective and client Perspective.

IV. APPROACH FOR IDENTIFICATION OF REUSABLE MODULE


For identification of reusable module consist following Get the Super class
step and these are: Analyzing the source code and calculating of the all class in the
the all metrics and displaying the result. These steps are package
shown in figure 1

Source Extract Calculating


Code the Code Metrics Make a tree based
on that information

Displaying

Find the Maximum


Depth (Max)

Displaying
Source Code
is Reusable
DIT = Max
or Not

Figure-1

V. PARAMETERS FOR CALCULATING REUSABILITY

A. D.I.T. (Depth of Inheritance)


Figure-2 Algorithm for D.I.T. calculator
This metric is used for measuring the inheritance
complexity for the programs, when programmer uses the
inheritance in his program then this Metric can be used. DIT is C. Number of Children (N.O.C.)
the Maximum depth from the root node of tree to particular NOC is defined as Number of the Sub- Classes of the
node. Here class is represented as a node. Deeper node in the Particular class in hierarchy of the class. If class has more
tree has more no of the methods because they inherit the more children then it requires more testing because subclass may
classes in the tree and it makes the class more complex. misuse the super class.
Figure-2 shows the algorithm for D.I.T Calculator.

2 www.erpublication.org
International Journal of Engineering and Technical Research (IJETR)
ISSN: 2321-0869, Volume-1, Issue-5, July 2013
D. Lines of Code (L.O.C.) An attribute of one class is modified / used by a
This metrics used for measuring the size of the program by method of another class
counting the no of line in program. Lines of Code (LOC) An attribute is defined in terms of something defined
counts all lines like as source line and the number of in another class
statements, the number of blank lines, and the number of
comment lines. We are using the Coupling Metrics for determine Coupling
between the classes. This metrics is also determining the
E. Comment Percentage (C.P.) indirect Coupling between the classes. Suppose system
having the Set of class C = {C1, C2, C3.Cn} and Mj = {M1,
CP is calculated by number of comment line divided by Line M2, M3 .Mk} is the set of the methods which is having in
of Code. High value of the CP increases the understandability class Cj.And Ri,j is defined as no of the method and instance
and maintainability. variable in class Cj which is called by class Ci. [9]
CP = Comment Line / LOC; We define Direct Coupling between class I to class j
F. Public Interface Size (P.I.S.) CoupD (i,j), as ratio of number of methods of class j called by
class I to total no of the methods in the class i.Measure the
Public interface size is defined as a number of the public
coupling of the class is defined as
method present in the class. Which describe how much other
class is using that class method?
Class Coup = Coup (i,j) / (m*m-m);

WMC=0 H. Module Cohesion

We use the Cohesion Metrics for determining Cohesiveness


of the class. This metrics also determines the indirect
cohesion between the methods.
Obtain the list of Suppose class have a set of methods M = {M1, M2, M3
method in class (n) Mn} and Vj = {V1, V2, V3 Vm} is the set of instance
variable used by method Mj. [9]

We calculate the direct similarity of two methods Mi and Mj


by using this formula.
SimDi, j Vi V j / Vi V j
N>0

The cohesion of the class is defined as

Select the method one ClassCoh Sim (i, j) / (m * m - m)


by one from list

VI. REUSABILITY METRICS


Identify the reusable module is one of the difficult task. We
Find the predicate node already explain factor on which reusability depend. Most
(P) in the method important factor on which reusability depends are coupling
and complexity. If the coupling is high of module and
reusability of that module is low. And if the complexity of the
module is high then reusability of that module is low. [6]
Cyclo Comp = p+1
Formula for calculating the reusability of objected oriented
program is described below.

WMC = WMC + CC Re usability 0.25M 0.25I 0.25D 0.25C

Where, M is Modularity of system


I is Interface Size of system
C is Complexity of system
D is Documentation of system

Figure-3 Algorithm for WMC Calculator


There are some software attributes which affect the reuse. The
G. Module Coupling relationship between these attribute and the reusability are
explained as follows:
Coupling can occur if Class size: if the size of the class is large then it is
A method of one class is invoked from another class hard to understand and difficult to reuse.

3 www.erpublication.org
Method for Estimating Reusable Module in Object Oriented Program

Complexity : if the complexity of the class is high or 2008 he joined as an assistant professor of Department of
for developing the class developer uses a Information Technology in Raipur Institute of Technology.
complicated structure then that type of class is He is now pursuing Master of Technology in Computer
difficult to understand and difficult to reuse. Science & Engineering at Chhattisgarh Swami Vivekananda
Dependencies: Dependency of the one module to Technical University, Bhilai. He is also a research scholar/
several modules may also make reuse more difficult Student of M.Tech in R.I.T., Raipur. Presently he is working
Complexity of interface: Complicated interface on the principles of Software Engineering Metrics.
make reuse difficult.
Avinash Dhole is The Head of Computer
Science & Engineering Department in
Raipur Institute of Technology, Raipur. He
VII. CONCLUSION received his B.E. degree in Computer
The Purpose of this method is finding the approach and Science from Government Engineering
way to calculate reusability of object oriented programs. College, Bilaspur. He joined as an assistant
professor at Raipur Institute of Technology
Reusability is one of the quality attribute and it is of prime
in 2005. During this period he obtained Master of Technology
importance in object oriented software development as
degree from C.S.V.T University, Bhilai in 2009. He has
reusability leads to increase in developer productivity, reduce
worked on various researches such as automata theory,
development cost as well as reduce time to market. software engineering and neural networks.
REFERENCES
[1] Anthes, Gary I I., Software Reuse Plans
BringPaybacks, Computeworld, Vol. 27, KO. 49,
pp.73-76.

[2] [BB81] J.W. Bailey and V.R. Basili. A meta-model


for software development resource expenditures.
Proc. Fifth Int. Conf. Software
Engineering.Pages107-116. 1981.

[3] [CDS86] S.D. Conte, H.E. Dunsmore, and V.Y.


Shen, Software Engineering Metrics and Models.
Benjamin"Cummings, Menlo Park, California 1986.

[4] [Boe81] B. W. Boehm. Software Engineering


Economics .Prenntice Hall, Englewood Cliffs, NJ,
1981.

[5] [Fen91] Norman Fenton. Software Metrics A


Rigorous Approach .Chapman & Hall, London,
1991.

[6] [Sel89] Richard W. Selby. Quantitative studies of


software reuse. In Ted J. Biggersta and Alan J.
Perlis, editors,

[7] Software Reusability Vol II Applications and


Experiences, Addison Wesley, 1989.

[8] http://www.indiawebdevelopers.com/articles/reusabil
ity.asp

[9] [CK93] Shyam R. Chidamber, Chris F. Kemerer, A


metrics suit for object oriented design,1993

AUTHOR PROFILE
Nehil Rao Nirmal received the B.E.
degree in Information Technology
Engineering from Pt.Ravi Shanker Shukla
University Raipur in 2007. During
2007-2008, he stayed in State Wide Area
Network Laboratory, in N.I.C. Raipur. In

4 www.erpublication.org

You might also like