Metrics on a class

 

Overview

Metrics calculated on a class are used to obtain:

·         the counting of the class' items (associations, attributes, operations)

·         information on links with other items

·         information on operations

·         the counting of parameters on each operation

 

 

Counting items

These metrics are used to calculate the number of associations, attributes and operations which are:

·         public

·         protected

·         private

·         class

·         abstract

·         documented

·         total

 

Figure 16 - Overview of metrics on a class

 

 

Operations

These metrics are used to calculate:

·         the percentage of inherited operations (NMI)

·         the number of operations added (NMA)

·         the number of operations overridden (NMO)

·         the average number of parameters per operation

·         the degree of responsibility (CR)

·         the degree of specialization (SIX)

 

Figure 17 - Metrics on a class - Operations

 

Dependencies

These metrics are used to calculate:

·         the number of classes used (all the elements are used by dependency links, generalization and associations, and by links defined by the type of operation parameters concerned)

·         the number of parent classes (NOP)

·         the number of child classes (NOC)

·         the depth of inheritance  (DIT)

 

Figure 18 - Metrics on a class - Dependencies

 

 

Description of an operation

The complete signature of the operation is displayed.

 

For every operation, metrics allow you to calculate the number of:

·         in parameters

·         out parameters

·         in/out parameters

·         primitive parameters

·         non-primitive parameters

·         parameters of different types

·         total parameters

 

Figure 19 - Metrics on a class