UML ROSE Usage (5) - Relationship

zhaozj2021-02-16  145

The relationship is the lexical connection between the class, is a class to understand the properties, operations, and relationships of another class. Four relationships can be established between classes: correlation, dependence, accumulation and generalization. Association: For example, the primary key relationship between the database, the association can be unidirectional or two-way. One-way associations are easy to use, and the two-way association is difficult to reuse. The association can also be retro. Dependency: Always one-way. Cumulative: Strength association. The accumulation relationship is the relationship between the overall and individuals. Generalization: The inheritance relationship between the class is displayed.

Differences in associations and dependencies:

1. Dependency does not increase attributes to the relationship.

2. The association can be two-way, and dependency can only be one-way. The dependency is also related to the relationship between the package.

Person House If House is globally, Person knows it exists. If the House is instantiated into the local variable in the Person operation, Person knows his existence. If House is passed to the Person action, Person knows it exists.

Broadense means that several instances of a class is associated with one instance of another class.

转载请注明原文地址:https://www.9cbs.com/read-7773.html

New Post(0)