According to the UML standards, when using Sequence diagrams, is it strictly defined who has perform()
operation specified in this message below?
Foo interacts with Bar, "passing a message"
(there is a typo in the diagram it should say perform()
)
The possible combinations that I would like to know which ones are valid (say in the accompanying class diagram)
A.
Foo
has it and Bar
can't have it:
B.
Bar
has it and Foo
can't have it:
C. Possibly both coud have it:
I can't find the concrete definition in UML spec, and wondering also what authoritative resources (Fowler, Jacobson, Booch, Rumbaugh) say about it.
The thing at the pointy end of the arrow (in this case, a Bar) must offer an operation for the thing at the blunt end of the arrow (in this case, a Foo) to be able to call it. So, option B is required.
There is nothing preventing both sides from offering the same operation, though. So, option C is also possible.
Note that there’s a typo in your sequence diagram.