The public operations on components and composites are:
- • Composite can enumerate components.
- • Component knows its container.
- • Add/remove a component to/from the composite.
The operation to add a component to a composite updates the container of the component. There should be no other way to change the container of a component.
Smalltalk does not enforce private methods.