Explanation of the UML arrows

后端 未结 10 1690
北恋
北恋 2020-11-27 08:55

I have recently been studying UML and drawing simple diagrams with ordinary plain arrows between classes, but I know it\'s not enough. There are plenty of other arrows: gene

相关标签:
10条回答
  • 2020-11-27 09:09

    If you are more of a MOOC person, one free course that I'd recommend that teaches you all the in and outs of most UML diagrams is this one from Udacity: https://www.udacity.com/course/software-architecture-design--ud821

    0 讨论(0)
  • 2020-11-27 09:09

    Aggregations and compositions are a little bit confusing. However, think like compositions are a stronger version of aggregation. What does that mean? Let's take an example: (Aggregation) 1. Take a classroom and students: In this case, we try to analyze the relationship between them. A classroom has a relationship with students. That means classroom comprises of one or many students. Even if we remove the Classroom class, the Students class does not need to destroy, which means we can use Student class independently.

    (Composition) 2. Take a look at pages and Book Class. In this case, pages is a book, which means collections of pages makes the book. If we remove the book class, the whole Page class will be destroyed. That means we cannot use the class of the page independently.

    If you are still unclear about this topic, watch out this short wonderful video, which has explained the aggregation more clearly.

    https://www.youtube.com/watch?v=d5ecYmyFZW0

    0 讨论(0)
  • 2020-11-27 09:14

    A very easy to understand description is the documentation of yuml, with examples for class diagrams, use cases, and activities.

    0 讨论(0)
  • 2020-11-27 09:17

    A nice cheat sheet (http://loufranco.com/wp-content/uploads/2012/11/cheatsheet.pdf):

    It covers:

    • Class Diagram
    • Sequence Diagram
    • Package Diagram
    • Object Diagram
    • Use Case Diagram

    And provides a few samples.

    0 讨论(0)
  • 2020-11-27 09:18

    My favourite UML "cheat sheet" is UML Distilled, by Martin Fowler. It's the only one of his books that I've read that I do recommend.

    0 讨论(0)
  • 2020-11-27 09:21

    The accepted answer being said, It is missing some explanations. For example, what is the difference between a uni-directional and a bi-directional association? In the provided example, both do exist. ( Both '5's in the arrows)

    If looking for a more complete answer and have more time, here is a thorough explanation.

    0 讨论(0)
提交回复
热议问题