OOP Metrics
There are many kinds of posssible OOP metrics that can be used. Here are a few that have been used (or variations of them)
Ave. Methods/Class
Total No. of Methods
Average No. of Methods per Object Class = --------------------------
Total No. of Object Classes
|
|||||||||||||||
Inheritance Dependencyhave inheritance tree(s)
Inheritance Tree Depth = max{Inheritance Tree Path Length}
|
|||||||||||||||
Coupling: Degree between Objects
Total No. of Arcs
Average No. of Uses Dependencies per Object = -------------------
Total No. of Objects
Arcs - in an Object Use-Case
Maximum No. = max{No. of Uses Arcs}
Arcs - attached to any single object in a use-case
|
|||||||||||||||
Object Library EffectivenessAverage Number of Times a Library Object is Reused:
Total Number of Object Reuses
Average Number = -----------------------------
Total Number of Library Objects
|
|||||||||||||||
Factoring Effectiveness
Number of Unique Methods
Factoring Effectiveness = ------------------------
Total Number of Methodss
|
|||||||||||||||
Degree of Reuse of Inheritance MethodsPercent of Potential Method Uses Actually Reused (PP):
Total Number of Actual Method Uses
PP = ------------------------------------ x 100
Total Number of Potential Method Uses
Percent of Potential Method Uses Overridden (PM):
Total Number of Methods Overridden
PM = ------------------------------------- x 100
Total Number of Potential Method Uses
|
|||||||||||||||
Application GranularityOne of the goals of object-oriented design is finer granularity. The purpose is to achieve a greater level of abstraction than possible with data/procedures-oriented design.An application constructed with more finely granular objects (i.e. a lower number of functions per object) is likely to be more easily maintained because objects should be smaller and less complex. More finely granular objects should also be more reusable. ... Therefore, each object's behavior should be more easily understood and analyzed.
Total Number of Objects
Application Granularity = -------------------------
Total Function Points"
|
