UML Class Diagram Learning

Source: Internet
Author: User
Tags flock

Class diagram, the British Civilization Yue: Class diagram, then the class is after how magical transformation, into a class diagram? As we all know, classes are descriptors of a set of objects with similar structures, behaviors, and relationships, classes are the most important building blocks in object-oriented systems, and class diagrams show a set of classes, interfaces, collaborations, and relationships between them. In UML, the problem domain will be gradually transformed, modeled by class, and the system is realized by the programming language component, the class plus their relationship constitutes the class diagram, the class diagram can also include the interface, the package and so on, can also include the object and other instances.

Now let's take a look at the class diagram, and first let's see what relationships exist between class diagrams:

Let's go through the layer decomposition of the relationship between the class diagrams. First, let's take a look at the aggregation in the association, the aggregation, from her literal meaning that the big guys come together without particularly strong binding force, emphasizing the relationship between the whole and the part, let's look at an aggregated graph:

The relationship between wild geese and wild geese is a matter of aggregation, when the geese migrate, a wild goose belongs to a flock of wild geese, a flock of geese can have a lot of wild geese, geese leave the flock or wild goose, Wild Goose Group left one of them, so there are other geese, geese can be separated from the Wild Goose group. Next, the association in the combinatorial relationship, from her literal, we can easily understand that the big guys are assembled together, with strong binding, and here we look at a combination of graphs:

The relationship between the wild Goose and the feather and the wing is a combination, no wild goose has no wings and feathers, only wings and feathers can not be wild goose, wings and feathers leave the wild goose without the meaning of existence, the wild goose leaves the wing and the feather also cannot constitute the wild goose, the wing and the feather cannot A combination is a form of aggregation in which she has a stronger ownership relationship, emphasizing that the whole and part of the lifecycle is consistent, that the whole is responsible for the management of part of the lifecycle, and that if the whole is destroyed, parts must be destroyed together, and parts must be replicated together if the owner is copied.

Next, let's take a look at the dependencies and look at the following picture:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.