Computer Science, asked by purnima492, 1 year ago

which term best describes a relationship in which an object is owned exlusivly by only one other object java programming

Answers

Answered by anshulkumar31
0
The distinction between association, aggregation and composition as you describe it is a legacy going back to the old times of manual memory management. For example in C++ the memory used by objects has to be manually released and it is thus paramount to carefully design the lifecycle of composed objects. While the distinction between aggregation and composition is still being taught by many text books, it is essentially irrelevant when programming in environments with automatic memory management. If you have garbage collection all of them are just composition, period.
Similar questions