'How do we appropriately aggregate class level metrics to package level?

On a java project, I am using CKJM suite to get the following metrics

  • WMC - Weighted methods per class
  • DIT - Depth of Inheritance Tree
  • NOC - Number of Children
  • CBO - Coupling between object classes
  • RFC - Response for a Class
  • LCOM - Lack of cohesion in methods

These metrics provide values at a class level. What are appropriate measures we can use to aggregate these values at a package level? Simple averaging will, for instance, skew the meaning of the values e.g LCOM expects values from 0 to 1 but can have a higher value. A higher value averaged will not be a true representation of what is happening at a package level. This is further true as there is no upper or lower bound present. In such a case, what would be the best approach toward aggregating class-level metrics to package level?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source