UML (Unified Modeling Language, Unified Modeling Language)
Relationship in class diagram:
General relationship: Generalization relationship: means inheritance relationship between classes and classes, inheritance relationship between interfaces and interfaces, or realization of classes. [extends, imports]
Association: Association relationship is the connection between classes and classes, which makes a class knows the properties and legislation of another class. The association can be two-way or one-way. In Java, the association relationship is implemented using instance variables. An association is often further determined as a polymerization relationship or synthetic relationship.
Aggregation: AGGREGATION relationship is one of associated, is a strong relationship. The polymerization is the relationship between the overall and individuals. Like the association, the polymerization relationship is also achieved by instance variables. Association and aggregation are only distinguished from Java grammar, and the logical relationship between the classes involved is needed.
Synthetic relationship: Composition relationship is a kind of association relationship. It is a strong relationship with a polymerization relationship. It requires the overall object to represent the lifecycle of the object, and synthetic relationships cannot be shared.
Dependencies: Dependency is also a connection between classes and classes, depending on always one-way. Dependencies represent a definition of another class.
In general, dependencies are reflected in the Java language as a local variable, the method of the method, and the call to the static method. In other words, the type of a local variable of a class A is another class B, then class A is dependent on class B. If a method of a method is an instance of another class B, the class A where this method is located is dependent on class B. If a class A calls another type of static method, then class a depends on class B.
If class B appears in the instance variable of class A, then the relationship between class A and class B beyond the dependencies, which becomes a correlation relationship.