A Class Cohesion Metric For Object-Oriented Designs

Cohesion is a measure of relatedness or consistency in functionality of a software component. It is a highly desirably design characteristic because it measures separation of responsibilities, independence of components, and control of complexity. Cohesion has a significant effect on a design’s understandability, effectiveness and adaptability. An early evaluation of design components for cohesion can significantly improve the quality of a design, by helping identify and redesign components that have scattered functionality or inconsistencies and that are complex. In this article we present a new metric to evaluate cohesion among methods of a class early in the analysis and design phase. The metric evaluates the consistency (focus) of methods in a class’ interface using the parameter lists of the methods. This metric can be applied on class declarations that only contain method prototypes (method name and parameter types). The effectiveness of the metric is validated and demonstrated by correlating its results with existing measures of cohesion such as the Lack of Cohesion Among Methods Metric (LCOM) proposed by Chidamber and Kemerer and later interpreted by Li and Henry, which can be applied only after the implementation of methods of a class. Also, the metric is correlated with the cohesiveness evaluation of classes done by human experts.

[1]  Letha H. Etzkorn,et al.  A Practical Look at the Lack of Cohesion in Methods Metric , 1998, J. Object Oriented Program..

[2]  Martin Hitz,et al.  Chidamber & Kemerer's Metrics Suite: a Measurement Theory Perspective , 1996 .

[3]  Chris F. Kemerer,et al.  Towards a metrics suite for object oriented design , 2017, OOPSLA '91.

[4]  Grady Booch,et al.  Object-oriented analysis and design with applications (2nd ed.) , 1993 .

[5]  Sallie M. Henry,et al.  Maintenance metrics for the object oriented paradigm , 1993, [1993] Proceedings First International Software Metrics Symposium.

[6]  James M. Bieman,et al.  Measuring Functional Cohesion , 1994, IEEE Trans. Software Eng..

[7]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[8]  R. G. Dromey,et al.  Cornering the Chimera , 1996, IEEE Softw..

[9]  Sallie M. Henry,et al.  Measuring Object-Oriented Design , 1995, Journal of object-oriented programming.

[10]  Victor R. Basili,et al.  A validation of object oriented metrics as quality indicators , 1996 .