A Proposal of a New Class Cohesion Criterion: An Empirical Study

A Proposal of a New Class Cohesion Criterion: An Empirical Study
复制标题

DOI:
10.5381/jot.2004.3.4.a8
复制
发表时间:
2004
期刊:
J. Object Technol.
影响因子:
--
通讯作者:
L. Badri;M. Badri
L. Badri;M. Badri
中科院分区:
其他
文献类型:
--
作者:
L. Badri;M. Badri

文献摘要

被引文献

相似文献

班级凝聚力是指班级成员之间的关联度。它被认为是面向对象软件最重要的属性之一。在文献中已经提出了几个度量标准来度量面向对象系统中的类内聚力。它们通过类内成员之间的联系来捕获类凝聚力。现有的主要类凝聚力度量实质上是基于实例变量的使用标准。它只是捕获类凝聚力的一种特殊且受限制的方式。我们相信,正如许多论文所指出的那样,类内聚力不应该完全基于公共实例变量的使用标准。在本文中,我们引入了一种新的标准,它侧重于类方法之间的交互。我们为Java程序开发了一个内聚力度量工具,并在几个系统上进行了案例研究。结果表明,基于所提出的内聚准则,我们的新的类内聚度量捕获了几对相关的方法,这些方法是现有的内聚度量所不能捕获的。
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.