Jump to content

Protocol (object-oriented programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jan Hidders (talk | contribs) at 09:13, 2 September 2002 (an accent less). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In object-oriented programming the interface of an object is a description of

  1. the messages that are understood by the object,
  2. the arguments that these messages may be supplied with, and
  3. the types of the results that these messages return.

If an object-oriented programming language provides full encapsulation then the interface describes the only way in which objects may be accessed by other objects.

To be written:

  • public interface
  • private interface
  • other interfaces