In object-oriented systems, cohesion refers to the degree of the relatednes
s of the members in a class and strong cohesion has been recognized as a hi
ghly desirable property of classes. We note that the existing cohesion meas
ures do not take into account some characteristics of classes, and thus oft
en fail to properly reflect the cohesiveness of classes. To cope with such
a problem, we propose a new cohesion measure where the characteristics of c
lasses are incorporated. Our cohesion measure takes into account the member
s that actually have impact on the cohesiveness of a class, and is defined
in terms of the degree of the connectivity among those members.
We develop a cohesion measurement tool for C++ programs, and perform a case
study on a well-known class library in order to demonstrate the effectiven
ess of our new measure. By performing principal component analysis, we also
demonstrate that our measure captures a new aspect of class properties whi
ch is not captured by the existing cohesion measures. Copyright (C) 2000 Jo
hn Whey & Sons, Ltd.