The difference between relationship and dependencies

Relationships: A class instance of the object class when needed reference or pointer as a parameter B

Dependencies: A method of a class using Classes B, may be the parameters of the method is a method in the class B or class were obtained in an instance of B

In a class member variable appears in the form of another class, both the association relationship; class to a local variable appears in the form of another class, the two are dependencies.

 

Aggregation relationship: weak association, and the whole part can exist independently

Combining relationship: strong association, integral and inseparable part, can not exist independently.


Guess you like

Origin blog.51cto.com/31329846/2428540