I l @ ve RuBoard |
Specialization provides the ability to create subclasses that represent refinements to the superclasstypically, structure and behavior are added to the new subclass. This method of finding inheritance often comes into play if a class already exists. Subclasses are added to specialize the behavior of an existing class. For example, the registration system could be expanded to allow senior citizens to take classes free of charge. A new subclass called SeniorCitizen could be added to the RegistrationUser hierarchy to hold information pertinent to senior citizens . Operations may be overridden by a subclass. However, a subclass should never restrict an operation defined in its superclasses. That is, the subclass should never provide less behavior or structure than its superclasses. CREATING INHERITANCE IN RATIONAL ROSE
An inheritance relationship is shown in Figure 8-1. Figure 8-1. Inheritance Relationship
|
I l @ ve RuBoard |