Search code examples
design-patternsumlobservableobserver-patternobservers

UML diagram diamond arrow


I do not have much experience with UML diagrams and was coming across a diagram which I didn't fully understood.

When I have the following UML diagram:

UML diagram

What my current understanding is about this UML diagram based on my research is that the observers are aggregated in the subject. And that concreteObserverA and concreteObserverB inherit from Observer.

Questions:

  1. Is my current understanding which I described correct?
  2. I saw in all sources from which I studied UML diagrams that they denote aggregation with an arrow. Is the relationship between Observer and subject still aggregation or is it something else?

Solution

    1. Yes, that how most people whit UML knowledge will understand it.

    2. Please, can you point to that source? Actually, Arrow is not Aggregation but Association relationship, that's two different but also very similar relationships.

    3. If you mean arrow==association and you man that observer pattern is painted using it, I would say that it only depends on who has that painted. See a discussion about these relations here: https://softwareengineering.stackexchange.com/questions/235313/uml-class-diagram-notations-differences-between-association-aggregation-and-co.