The Service View

Another way to think of an interface is that it is a description of the service that an object provides. In recent years it has become popular to describe this interface as a contract between the client and service provider. If the interface is upheld, then the service provider will perform the actions as described.

Note that the interface contrains both the client and the service provider. The client can only request the actions provided by the interface, and the service provideer is only obligated to provide those actions defined by the interface.

[audio] [real] Text to accompany slide18, in Chapter 2 of An Introduction to Object-Oriented Programming