An Investigation of Design Level Class Cohesion Metrics
Journal: The International Arab Journal of Information Technology (Vol.9, No. 1)Publication Date: 2012-01-01
Authors : Kuljit Kaur; Hardeep Singh;
Page : 66-73
Keywords : Design metrics; class cohesion metrics; product quality; cohesion among methods of a class; normalized hamming distance; scaled NHD; NHD modified;
Abstract
Design level class cohesion metrics are based on the assumption that if all the methods of a class have access to similar parameter types, then they all process closely related information. A class with a large number of parameter types common in its methods is more cohesive than a class with less number of parameter types common in its methods. In this paper, we review the design level class cohesion metrics with a special focus on metrics which use similarity of parameter types of methods of a class as the basis of its cohesiveness. Basically three metrics fall in this category: Cohesion Among Methods of a Class (CAMC), Normalized Hamming Distance (NHD), and Scaled NHD (SNHD). Keeping in mind the anomalies in the definitions of the existing metrics, a variant of the existing metrics is introduced. It is named NHD Modified (NHDM). A major point of difference is that the NHD metric counts a disagreement only if class methods taken as pairs disagree on a parameter type that one method uses but the other method, in the pair, does not use. It ignores the case when both methods of a pair do not use a parameter type. NHD indirectly counts it as an agreement, but NHDM considers such a case as a disagreement. An automated metric collection tool is used to collect the metrics data from an open source Java based software program containing 884 classes. Metrics data is then subjected to statistical analysis. The NHDM metric shows the maximum amount of variation in data values in comparison to other metrics in the group. NHDM is strongly correlated with CAMC. Unlike the previous studies, no significant correlation is found in CAMC and NHD
Other Latest Articles
- Design a Mini-Operating System for Mobile Phone
- Success of Endoscopy with Narrow Band Imaging in Diagnosis of Cervical Metaplasia
- Multiviews Reconstruction for Prosthetic Design
- Prioritized Heterogeneous Traffic-Oriented Congestion Control Protocol for WSNs
- A Framework for Distributed Pattern Matching Based on Multithreading
Last modified: 2019-04-30 15:15:11