Which modeling relationship allows instances of one class to substitute for instances of another?

Which modeling relationship allows instances of one class to substitute for instances of another?
A . auxiliary
B . association
C . dependency
D . replacement
E . generalization

Answer: E

Explanation:

Generalization in UML is a modeling relationship that connects a general classifier (like a class) to a more specific classifier. It is akin to an "is a" relationship where the specialized element (subclass) inherits features from the general element (superclass), thus allowing instances of the subclass to substitute for instances of the superclass. For example, if "Bird" is a superclass and "Eagle" is a subclass, an instance of "Eagle" can substitute for an instance of "Bird". This relationship is fundamental in object-oriented modeling for representing inheritance. According to the UML 2.5

specification, generalization allows a subclass to inherit part or all of the structure and behavior of a superclass.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments