-2

I am trying to understand UML abstract syntax seen in the UML Specifications. This example below is hard to understand. For example, I don't understand:

  • the {subsets ownedElement},
  • the hybrid composition-association,
  • the /relatedElement (heading slash),

Is there any tutorial or course that explain these points?

I have looked at different books and tutorials, but they don't really explain that.

Last, but not least, I do not understand this diagram at all. For example the Element is composed of... itself which looks bizarre. Element appears twice on the diagram, Comment inherit from an Element, but it is also composed of it... Lost, I am :(

enter image description here

2
  • Do you need to understand this for some exam or assignment? If not, don’t worry about it. UML is s failed design idea. It can be good for mapping out ideas, but in those situations, formal syntax isn’t important. But it is utterly useless as an “up front” formal design process.
    – David Arno
    May 28, 2018 at 20:53
  • No I am just curious. I would like to understand these diagrams
    – nowox
    May 28, 2018 at 20:55

1 Answer 1

2

In the SE classical book GoF. You can find a really good explanation of UML basic understandings in the Appendix B (and code examples in C++). Firstly is better to read an introduction and Appendix A.

  • Design Patterns: Elements of Reusable Object-Oriented Software.

And in this book you can find more examples with JAVA.

  • Head First Design Patterns, A Brain-Friendly Guide.

Aggregation implies that one object owns or is responsible for another object. Generally we speak of an object having or being part of another object. Aggregation implies that an aggregate object and its owner have identical lifetimes.

Acquaintance implies that an object merely knows of another object. Sometimes acquaintance is called "association" or the "using" relationship. Acquainted objects may request operations of each other, but they aren't responsible for each other. Acquaintance is a weaker relationship than aggregation and suggests much looser coupling between objects.

In our diagrams, a plain arrowhead line denotes acquaintance. An arrowhead line with a diamond at its base denotes aggregation

object composition - assembling or composing objects to get more complex behavior.

In your example you aggregate or inherit some amount of elements 1 to many, many to many relationships.

Google it: Delegation, Composition, Inheritance, Instantiator, Instantiatee.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.