Java Code Quality Matrices
Matrices Definition and Explanation Number of Classes For same project, more classes mean better abstracted. But try to keep this number down if applicable. Lines of Code (LOC) For same project, fewer lines of code mean better design and less maintenance. Number of Children (NOC) Number of immediate sub-classes of a class. Try to keep it down to avoid classes become too complex. Response for Class (RFC) Number of all methods implemented within the class plus the number of methods accessible to an object of this class due to implementation. The h igher the RFC, the more difficult to make changes. Try to keep it lower. Depth of Inheritance Tree (DIT) Maximum inheritance path from the class to the root class. Try to keep it under 5. Weighted Methods Per Class (WMC) Average number of methods defined in class. Try to keep it under 14. Coupling between Object Classes (CBO) Number of classes to which a class is coupled. Try to keep it under 14. Lack of Cohesion of Methods (LCOM4) It measures ...