Title: A Proposal of a New Class Cohesion Criterion: An Empirical Study.
Abstract:Class cohesion refers to the degree of the relatedness of the members in a class.It is considered as one of most important object-oriented software attributes.Several metrics have been proposed in the...Class cohesion refers to the degree of the relatedness of the members in a class.It is considered as one of most important object-oriented software attributes.Several metrics have been proposed in the literature in order to measure class cohesion in objectoriented systems.They capture class cohesion in terms of connections among members within a class.The major existing class cohesion metrics are essentially based on instance variables usage criteria.It is only a special and a restricted way of capturing class cohesion.We believe, as stated in many papers, that class cohesion should not exclusively be based on common instance variables usage criteria.We introduce, in this paper, a new criterion, which focuses on interactions between class methods.We developed a cohesion measurement tool for Java programs and performed a case study on several systems.The obtained results demonstrate that our new class cohesion metric, based on the proposed cohesion criteria, captures several pairs of related methods, which are not captured by the existing cohesion metrics.Read More