Exam4Training

Which statement should be taken into consideration when extending a UML metaclass with a stereotype?

Which statement should be taken into consideration when extending a UML metaclass with a stereotype?
A . UML recommends to start extending the metaclass "Class" and then other metaclasses depending on the expected qualities of the profile.
B . The choice of the extended metaclass is not that important since tools can always apply a profile’s filtering rules to hide unneeded metaclasses.
C . The metaclass and the stereotype that extends it should be semantically related to each other to avoid having to constrain the metamodel excessively.
D . UML specifies rules on how the mapping between stereotypes and UML metaclasses should be done; these rules must be followed to identify the best metaclasses.

Answer: C

Explanation:

When extending a UML metaclass with a stereotype, it is critical to ensure that the metaclass and the stereotype are semantically related. This is because a stereotype is a way to extend the UML metamodel to create new kinds of model elements that can include additional semantics and constraints, but still adhere to the base behavior defined by the metaclass. The stereotype should be a meaningful specialization of the metaclass and not contradict its fundamental semantics. By keeping them semantically related, there is less need for additional constraints on the metamodel, and the resulting profile is more intuitive for users. This is consistent with the principles described in the UML 2 Specification, particularly in the sections on profiles and stereotypes.

Exit mobile version