plz tel me about composition in Oop with exemple
compositioncomposition in oop
Page 1 of 1
2 Replies - 987 Views - Last Post: 05 June 2010 - 08:56 AM
Replies To: composition
#2
Re: composition
Posted 05 June 2010 - 08:10 AM
First, read this.
In layman's terms it means that an object "owns" another and when the "parent" dies, the associated item dies as well. For example: A car has an engine. If the car is destroyed, the engine is destroyed. As opposed to aggregation where the child object isn't destroyed. Let's say you have a school. If the school shuts down, the teachers continue to exist/be teachers.
In layman's terms it means that an object "owns" another and when the "parent" dies, the associated item dies as well. For example: A car has an engine. If the car is destroyed, the engine is destroyed. As opposed to aggregation where the child object isn't destroyed. Let's say you have a school. If the school shuts down, the teachers continue to exist/be teachers.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|