0

I'm currently reading Design Patterns: Elements of Reusable Object-Oriented Software by GoF and having trouble understanding the following sentence (page 19, Section 1.6):

Composition requires objects to respect each others' interfaces, which in turn requires carefully designed interfaces that don't stop you from using one object with many others

  1. Don't we always access objects through their interfaces? How can we not respect another object's interface?
  2. How can an interface stop me from using one object with many others?
  3. Does this statement "one object with many others" mean that an object should have a interface general enough so that it can be composed with many other objects?

0 Answers0