|Prev - Next - Down||SDMetrics - the UML design measurement tool|
For example, consider a rule stating that an abstract class should have child classes. The abstract class itself cannot be instantiated, so child classes are required for the class to become useful in the system. That rule can be defined as follows:
<rule name="NoSpec" domain="class" category="Completeness" severity="2-med"> <description>Abstract class has no child classes, must be specialized to be useful.</description> <violation condition="abstract='true' and NOC=0" /> </rule>The condition expression condition checks if the class is abstract, and the number of children of the class (metric NOC) is zero.
The "violation" procedure has two attributes;
|Section 8.3 "Definition of Design Rules"||Contents||Section 8.3.2 "Cycle"|