Example:
Source: Slice-Based Cohesion Metrics and Software
Tuesday, July 31, 2007
Data Slice
Posted by Software Engineering Notes at 4:33 AM 75 comments
The Mood Metrics Suite
The MOOD metrics suite consists of six metrics:
1 Method Hiding Factor (MHF): The MHF is defined as the ratio of the sum of the invisibilities of all methods defined in all classes to the total number of methods in a design.
2 Attribute Hiding Factor (AHF): The AHF is defined as the ratio of the sum of the invisibilities of all attributes defined in all classes to the total number of class attributes in a design.
3 Coupling Factor (CF): The CF metric is defined as the ratio of the number of class couplings to the maximum possible number of class couplings in a design.
4 Method Inheritance Factor (MIF): The MIF metric is defined as the ratio of the number of inherited (and not overridden) methods in all classes to the total number of available methods (locally defined plus inherited) for all classes in a design.
5 Attribute Inheritance Factor (AIF): The AIF metric is defined as the ratio of the number of inherited attributes in all classes to the total number of available attributes (locally defined plus inherited) for all classes in a design.
6 Polymorphism Factor (PF): The PF metric is defined as the ratio the number of methods that redefine inherited methods to the maximum number of possible distinct polymorphic situations.
Source: Indicators of Structural Stability of Object-Oriented Designs: A Case Study
Posted by Software Engineering Notes at 3:44 AM 145 comments
Lack of cohesion in methods
Example (Source: OMPSCI702 Software Measurement The "CK" Metrics)
Posted by Software Engineering Notes at 3:23 AM 134 comments
The CK Metrics Suite
The metrics are proposed by Chidamber and Kemerer.
Exercise of Coupling between Object Classes (CBO)
Reference: COMPSCI702 Software Measurement The "CK" Metrics
Posted by Software Engineering Notes at 2:31 AM 0 comments
Response for a class
When a large number of methods of a class can be invoked in response to a single message, the testing and debugging of the class becomes complicated. (Source: RFC)
Example (Source: COMPSCI702 Software Measurement The "CK" Metrics)
Posted by Software Engineering Notes at 2:26 AM 0 comments
Exercise of Coupling between object classes (CBO)
What is the CBO?
(A) 3
(B) 4
(C) 5
Source of the picture: Identify Collaborations
Posted by Software Engineering Notes at 2:02 AM 1 comments
Exercise of Depth of the inheritance tree
Why does some software practitioner say that a value of DIT greater than 4 will have to compromise encapsulation and increase complexity?
(Source: Depth of the inheritance three )
Posted by Software Engineering Notes at 1:20 AM 3 comments