Number Of Methods (NOM)
Overview
The Number Of Methods metric is used to calculate the average count of all class operations per class. A class must have some, but not an excessive number of operations.
This information is useful when identifying a lack of primitiveness in class operations (inhibiting re-use), and in classes which are little more than data types.
Computation
For a class, this is a simple count of the number of operations.
For a package, this is the average number of operations per class of the package.
Nominal range
Between 3 and 7.
Analysis
This value should remain between 3 and 7. This would indicate that a class has operations, but not too many. A value greater than 7 may indicate the need for further object-oriented decomposition, or that the class does not have a coherent purpose. A value of 2 or less indicates that this is not truly a class, but merely a data construction.