Abstract
Studies which consider the extent to which the encapsulation of a class is weakened by direct access to its hidden members (such as through the use of the friend construct in C) are scarce, and those that do exist are based on metric suites where the enabling mechanism of the coupling is ignored. This can lead to conclusions of limited construct validity where incorrect causes of coupling are suggested. In this paper a suite of software metrics which measure the amount of coupling enabled by different C programming language constructs (such as friendship and inheritance) are proposed. The metrics presented are based on a formal data model which can be easily adapted for other OO languages. This formal approach removes the scope for ambiguity in the metric definitions. These metrics provide a more accurate reflection of the causative agents of coupling in Object Oriented Systems and their utility is illustrated in an empirical study towards the end of the paper.
Original language | English |
---|---|
Pages (from-to) | 300-319 |
Number of pages | 20 |
Journal | Computer Languages, Systems and Structures |
Volume | 38 |
Issue number | 4 |
DOIs | |
Publication status | Published - Dec 2012 |
Keywords
- C
- Coupling
- Encapsulation
- Friend
- Information hiding
- Inheritance
- Object-oriented software
- Software measurement
- Software metric