Number Of Attributes (NOA)
Overview
The
Number Of Attributes metric is used to count the average number of
attributes for a class in the model.
This information is useful in identifying the following potential
problems:
· A class with too many attributes may indicate the presence of coincidental cohesion and require further decomposition, in order to better manage the complexity of the model.
· If there are no attributes, then serious attention must be paid to the semantics of the class, if indeed there are any. This may be a class utility rather than a class.
Computation
For
a class, this is a simple count of the number of attributes.
For
a package, this is a count of the
average number of attributes per class of the package.
Nominal range
Between
2 and 5.
Analysis
A
high number of attributes (> 10) probably
indicates poor design, notably insufficient decomposition, especially if this
is associated with an equally high number of methods.
Classes without attributes are particular
cases, which are not necessarily anomalies.
These can be interface classes, for example, which must be
checked.