On Inter-Method and Intra-Method Object-Oriented Class Cohesion

Cohesion has been a topic of interest since structured design [20, 23] in the 1970’s. Today, there are numerous researchers continuing this work into object-oriented designs [1, 3, 5, 7, 9, 10, 12, 13, 16, 18, 19, 22]. Most of the current research has focused on the interaction of methods within a class, the inter-method cohesion. In this paper we consider both the inter-method cohesion and the intra-method cohesion of a class. We have utilized the concept of program slice [21] and extended Functional Cohesion [2] to devise a new intra-method cohesion metric, ITRA-C, for measuring cohesion of each method within the class. This intra-method cohesion is based on the notion of effects and chaining in an effect-slice. We further combine the (inter-method, intra-method)-tuple into one combined Class Cohesion, which provides a quick view of bands of cohesion for classes. A sample of a commercial bank account class is then provided to illustrate these concepts and metrics.

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

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

[3]  Yuming Zhou,et al.  A comparative study of graph theory-based class cohesion measures , 2004, SOEN.

[4]  Shari Lawrence Pfleeger,et al.  Towards a Framework for Software Measurement Validation , 1995, IEEE Trans. Software Eng..

[5]  James M. Bieman,et al.  Cohesion and reuse in an object-oriented system , 1995, SSR '95.

[6]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .

[7]  Glenford J. Myers,et al.  Structured Design , 1999, IBM Syst. J..

[8]  Lionel C. Briand,et al.  A Unified Framework for Cohesion Measurement in Object-Oriented Systems , 2004, Empirical Software Engineering.

[9]  Carl G. Davis,et al.  A Hierarchical Model for Object-Oriented Design Quality Assessment , 2002, IEEE Trans. Software Eng..

[10]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[11]  Avinash C. Kak,et al.  API-Based and Information-Theoretic Metrics for Measuring the Quality of Software Modularization , 2007 .

[12]  Paul C. Jorgensen,et al.  Software Testing: A Craftsman's Approach , 1995 .

[13]  Brian Henderson-Sellers,et al.  Object-oriented metrics: measures of complexity , 1995 .

[14]  Laurie Hendren,et al.  Dynamic metrics for java , 2003, OOPSLA 2003.

[15]  Sandro Morasca,et al.  Defining and validating high-level design metrics , 1994 .

[16]  Doo-Hwan Bae,et al.  Improving cohesion metrics for classes by considering dependent instance variables , 2004, IEEE Transactions on Software Engineering.

[17]  Hermann Kaindl,et al.  Coupling and cohesion metrics for knowledge-based systems using frames and rules , 2004, TSEM.

[18]  Lionel C. Briand,et al.  A Unified Framework for Cohesion Measurement , 1997, IEEE METRICS.

[19]  Challa Bonja,et al.  Metrics for class cohesion and similarity between methods , 2006, ACM-SE 44.

[20]  Hany H. Ammar,et al.  Dynamic metrics for object oriented designs , 1999, Proceedings Sixth International Software Metrics Symposium (Cat. No.PR00403).

[21]  Avinash C. Kak,et al.  API-Based and Information-Theoretic Metrics for Measuring the Quality of Software Modularization , 2007, IEEE Transactions on Software Engineering.

[22]  James F. Power,et al.  Run-Time Cohesion Metrics: An Empirical Investigation , 2004, Software Engineering Research and Practice.

[23]  Martin Hitz,et al.  Measuring coupling and cohesion in object-oriented systems , 1995 .

[24]  Jason Crampton,et al.  The interpretation and utility of three cohesion metrics for object-oriented design , 2006, TSEM.

[25]  James M. Bieman,et al.  Measuring Design-Level Cohesion , 1998, IEEE Trans. Software Eng..

[26]  Yuming Zhou,et al.  ICBMC: an improved cohesion measure for classes , 2002, International Conference on Software Maintenance, 2002. Proceedings..