Abstract

Abstract Classes are the basic units in object-oriented programs. Therefore, the quality of a class has a great impact on the overall quality of the software. Class cohesion is one of the important quality factors and it refers to the degree of relatedness of the class attributes and methods. Several class cohesion metrics are proposed in the literature, and a few of them empirically address the effect of considering transitive relations between class attributes and methods caused by method invocations. 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 transitive relations 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 improves when considering both direct and transitive relations in the LCOM computation.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call