Understanding Association, Aggregate, and Composition
(2009-04-15 09:28:34)
下一个
Association is the ability to send messages from one instance to another. Aggregation is a part-whole relationship and is exactly the same as association except it doesn't allow a part to contain its whole. Composition is exactly like aggregation except that the lifetime of the 'part' is controlled by the 'whole'.