In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the main relationship between classes in UML, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
In UML, the relationship between classes is divided into association, dependency, generalization, aggregation, composition, and implementation.
Association: reflects the relationship between the class and its instances, not the properties of the class itself. For example, a foreign key is an association. He refers to the relationship between the implementation objects of this class and the implementation objects of other classes.
Dependency: two classes An and B; if the change of class B may affect the change of class A, it is said that class A depends on class B. (the change of the attribute of the class itself), for example, if the Ministry of Education formulates the examination outline, the school will change the teaching material. The school depends on the Ministry of Education.
Generalization: generalization is the opposite of inheritance. Class An inherits class B, then class B is a generalization of class A. Generalization is some special cases in a class. For example, in a pack of dogs, several dogs have no tail. The relationship between these dogs and those without tails is called generalization.
Shared aggregation: aggregation is also called aggregation. It represents the relationship between the constituent elements and the new things after they are formed. Shared aggregation means that the constituent elements can form other new classes. It is not unique to this category. So it's called sharing; for example, a shared girlfriend is a girlfriend that many men can have, which can be yours, so that his girlfriend can form boyfriend and girlfriend with different men.
Combinatorial aggregation: also known as combinatorial relationship, as opposed to shared aggregation. Represents the constituent class, which is connected to this class. Just like a wife, you can't share it. A wife shares weal and woe.
Implementation relationship: implementation describes the relationship between the description of the class (interface) and the amount of implementation of the class. Class An implements class B.
These are the main relationships between classes in UML, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.