Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the UML object relationships?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "what are the UML object relationships". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "what are the UML object relationships" can help you solve the problem.

The relation of UML object relation

Association relationship is the simplest and most abstract description of the relationship between objects. It only describes that there is a business and conceptual logical relationship between object An and object B, but the two sides of the relationship do not contain the attributes of each other.

The aggregation relation of UML object relation

Aggregation relationship is a special association relationship, which not only has the characteristics of association relationship, but also includes the following rules:

a. There is an inclusive relationship between object An and object B.

b. Between object An and object B, there must be a container on one side and an element on the other. Namely "whole-part" relation

c. The lifecycles of container-side and element-side objects are independent of each other and do not depend on each other, that is to say, a

A kind of "loose" connection. Containers and elements can be created and destroyed independently. The container does not exist and does not affect the existence of the element. The container can still exist if the element does not exist.

d. The container side can have no elements or one or more elements

e. Elements can be included in one container or in multiple containers

f. Adding elements to or removing elements from a container does not affect the container

The combinatorial relation of UML object relation

Combinatorial relationship is a special aggregation relationship, which not only has the characteristics of association relationship and aggregation relationship, but also includes the following rules:

a. The lifecycles of container-side and element-side objects are interdependent. That is, the element depends on the container, and once the container does not exist, then the element cannot exist. The container must be created before the element, and the element must be destroyed before the container.

b. Elements can only be "contained" in one container.

If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report