Theoretical Analysis for the Impact of Including Special Methods in Lack-of-Cohesion Computation
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 an object-oriented software internal key quality attribute, and it refers to the degree of relatedness of class members. Software developers use...
Saved in:
Published in | Procedia technology Vol. 1; pp. 167 - 171 |
---|---|
Main Author | |
Format | Journal Article |
Language | English |
Published |
Elsevier Ltd
2012
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | 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 an object-oriented software internal key quality attribute, and it refers to the degree of relatedness of class members. Software developers use class cohesion measure to guide the restructuring of poorly designed classes and assess the quality of the software products. Several class cohesion metrics are proposed in the literature, and the impact of considering the special methods (i.e., constructors, destructors, and access and delegation methods) in cohesion calculation is not thoroughly theoretically studied for most of them. In this paper, we address this issue for five popular class lack-of-cohesion metrics. For each of the considered metrics we theoretically study the impact of including or excluding special methods on the values that are obtained by applying the metric. This study is based on analyzing the definitions and formulas that are proposed for the metrics. The results show that including/excluding special methods has a considerable effect on the obtained cohesion values and that this effect varies from one metric to another. The study shows the importance of considering the types of methods that have to be accounted for when proposing a cohesion metric. |
---|---|
ISSN: | 2212-0173 2212-0173 |
DOI: | 10.1016/j.protcy.2012.02.031 |