A Typical Method Implementation

Here is a typical implementation section for a program in Object Pascal. Note that the implementation section can contain constant and variable descriptions, but that these values are private, local to the implementation.

The name associated with a method need not be unique, several different classes can all have methods with the same name. Thus, the implementation must specify both the class and method name. This is accomplished using a dot notation that mirrors the syntax used in message sending in Object Pascal.

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