Steve
Saibabaa Pragada wrote:Please use the following code as base while showing the differences
Steve
Steve Luke wrote:
Aggregation is an Association relationship where the Association can be considered the containing class 'Owning' the contained class, and the lifetime of that relationship is not defined. 'Owning' can be determined as a single-direction Association. In the above example, the Person Has-A Costume, but the Costume would not Have-A Person. More importantly the Person to Costume Association is transient. In Java you can usually tell this because there are setter methods, or other means of adding / replacing the contained Object. So for the Person class you might have:
Rajath Agasthya
There is nothing wrong with waking old threadsraja singh kumar wrote:Sorry to wake up an old thread.
No. Any analogies to parent and child fall down very quickly when you try to apply them to object‑oriented programming, so I think you should forget all about parent and child.Some definitions of aggregation and composition talk about Parent-Child relationship. Is this parent-child concept the one based on inheritance where we inherit? . . .
Squanch that. And squanch this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|