I'm reading Grady Booch's book third edition. In page 94, Booch said that:
We can furthur devide the interface of a class into four parts:
- Public: a declaration that is accessible to all clients
- Protected: a declaration that is accessible only to the class itself and its subclasses
- Private: a declaration that is accessible only to the class itself
- Package: a declaration that is accessible only by classes in the same package
I can understand why protected declaration can be considered a interface, becuase subclasses of a class is this class's client, too.
But I don't understand why the private declaration can be considered as interface. Please enlight me.
