Measuring class coupling in object-oriented design

No Thumbnail Available

Date

Journal Title

Journal ISSN

Volume Title

Publisher

Saudi Digital Library

Abstract

Measuring the coupling between classes in an object-oriented design is a way to determine the quality of the design. Coupling is the level of interaction between the system components. In object-oriented design the coupling between two objects expressed by message passing is known as interaction coupling, and the coupling between superclasses and their subclasses is known as inheritance coupling. Distinguishing the interaction coupling from the inheritance coupling in the object-oriented systems increases the measurement complexity. On one hand, weakly coupled classes are desirable; on the other hand, inheritance which tightly couples superclasses and their subclasses helps us exploit the commonality among abstractions. In this thesis, the existing metrics for both types are surveyed, and a new coupling metric is developed for each type. In the new class inheritance coupling metric the system is represented by a matrix of weighted elements. The elements are the attributes and methods of the classes. Each row of the matrix represents the weights of the elements in proportion to one of the classes. These weights are fed into a model that automatically calculates the inheritance coupling between the system classes. The new class interaction coupling metric measures the coupling between two classes that are related through message passing and not inheritance. The number of messages and their parameters number are used to quantify the interaction coupling between the classes. The new metrics capture most of the coupling factors that are specific for each type. The new class inheritance coupling metric has been evaluated experimentally on a practical case study, while the new interaction coupling metric has been evaluated experimentally on two case studies. It is shown that the new metrics outperform the existing metrics in terms of satisfying the coupling factors.

Description

Keywords

Citation

Endorsement

Review

Supplemented By

Referenced By

Copyright owned by the Saudi Digital Library (SDL) © 2025