A Cohesion Measure for Classes in Object-Oriented SystemsYong Rae Kwon

  • Authors:
  • Heung Seok Chae;Korea Advanced Institute of Science; Technology

  • Affiliations:
  • -;-;-

  • Venue:
  • METRICS '98 Proceedings of the 5th International Symposium on Software Metrics
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Classes are the fundamental concepts in the object-oriented paradigm. They are the basic units of object-oriented programs, and serve as the units of encapsulation, which promotes the modifiability and the reusability of them. In order to take a full advantage of the desirable features provided by classes, such as data abstraction and encapsulation, classes should be designed to have a good quality. Because object-oriented systems are developed by heavily reusing the existing classes, the classes of poor quality can be a serious obstacle to the development of systems.This paper defines a new cohesion measure for assessing the quality of classes. Our approach is based on the observations on the salient natures of classes which have not been considered in the previous approaches. A Most Cohesive Component(MCC) is introduced as the most cohesive form of a class. We believe that the cohesion of a class depends on the connectivity of itself and its constituent components. We propose the connectivity factor to indicate the degree of the connectivity among the members of a class, and the structure factor to take into account the cohesiveness of its constituent components. Consequently, the cohesion of a class is defined as the product of the connectivity factor and the structure factor. This cohesion measure indicates how closely a class approaches MCC; the closely a class approaches MCC, the greater cohesion the class has.