Skip to main content

COM Containment and Aggregation

· One min read

Containment and aggregation are techniques in which one component uses another component. Those two components are outer component, inner component. Outer component contains the inner component.

ContainmentAggregation
Outer component re implement the interface say IY of inner component by forwarding calls to the inner component.Outer component will not re implement the interface say IY of inner component. Instead the outer component passes the inner component interface pointer say IY directly to the client.
Outer component is client to inner componentInner component will be directly used by the client