📜  oop 中的关联是什么 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:29.893000             🧑  作者: Mango

代码示例1
Association is a ‘using’ relationship between two or more objects. 
In Association, all object has their separate lifecycle, and there is no owner. 
Example:
     A doctor can be associated with multiple patients. 
     At the same time, one patient can visit multiple doctors. 
     Each of these objects has its own life cycle and there is no “owner” or parent.
     The objects that are part of the association relationship can be created and destroyed independently