Infolinks In Text Ads

Composition In Java

Composition:
  • Method of reuse in which new functionality is obtained by
    creating an object composed of other objects
  • The new functionality is obtained by delegating functionality to
    one of the objects being composed
  • Sometimes called aggregation or containment, although some
    authors give special meanings to these terms
  • For example:
                Aggregation - when one object owns or is responsible for another object
                  and both objects have identical lifetimes (GoF)
               Aggregation - when one object has a collection of objects that can exist on
                their own (UML)
               Containment - a special kind of composition in which the contained object
               is hidden from other objects and access to the contained object is only via
               the container object (Coad)

Newer Post Older Post

Leave a Reply

Powered by Blogger.