Which Operation represents a binding of that template Operation?

Consider the following template Operation:

addElement <E> (e : E)

Which Operation represents a binding of that template Operation?
A . addElement (e : Card)
B . addElement <e : Card>
C . addElement« E -> Card » (e : Card)
D . addElement «bind» E -> Card (e)

Answer: A

Explanation:

The correct representation of a binding of the template operation addElement<E> with E being bound to the type Card is addElement (e : Card). This notation means that the template parameter E is being replaced by the concrete type Card, thus instantiating the template operation with that specific type. In UML, this instantiation does not require the «bind» keyword or the template brackets <> around the type in the operation signature itself; it is simply represented by using the concrete type as the type of the parameter in the operation. This usage is consistent with the UML 2.x Superstructure Specification, which explains how operations of a template classifier are instantiated when template parameters are bound to actual types.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments