Wednesday, July 25, 2007

Modeling Generalization

Generalization and inheritance are used synonymously.

There are 6 fundamental criteria for generalizing classes.
-attribute definitions
-attribute domain of values
-operations(signature)
-methods
-associations
-links



Figure 6-39: Shared target style notation for generalizations.


Model an abstract class
Italizing the name of the class, by providing the {abstract} property in the name compartment.


Constraints

UML predefines four constraints for use on generalization relationships
-Overlapping
-Disjoint
-Complete
-Incomplete

The overlapping constraint allows an instance to derive from multiple classes that are specializations based on different discriminators or powertypes.
The disjoint constraint prevents any overlap.
The complete constraint documents the fact that every possible subclass of a generalization has been identified and modeled.
The incomplete constraint documents the fact that the research on the possible subclasses is not finished.

No comments: