Improving object-oriented lack-of-cohesion metric by excluding special methods

  • Authors:
  • Jehad Al Dallal

  • Affiliations:
  • Department of Information Science, Kuwait University, Safat, Kuwait

  • Venue:
  • SEPADS'11 Proceedings of the 10th WSEAS international conference on Software engineering, parallel and distributed systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Classes are the basic units in object-oriented programs, and therefore, their quality has impact on the overall quality of the software. Class cohesion is a key quality factor, and it refers to the degree of relatedness of class attributes and methods. Software developers use class cohesion measure to assess the quality of their products and to guide the restructuring of poorly designed classes. Several class cohesion metrics are proposed in the literature, and the impact of considering the special methods (i.e., constructors, destructors, and access methods) in cohesion calculation is not empirically studied for most of them. In this paper, we address this issue for one of the most popular class cohesion metrics, referenced as Lack of Cohesion (LCOM). Our empirical study involves applying the metric with and without considering special methods on classes of two open source Java applications and statistically analyzing the results. The empirical study results show that the ability of LCOM in indicating class quality slightly improves when excluding special methods from the LCOM computation.