next up previous contents
Next: Constructors, Destructors, and Garbage Up: Encapsulation Previous: Sample Program   Contents

Messages

Methods are sometimes called member functions.

A message is simply the invocation of a method or member function.

The program sends a message to an object telling it to invoke the method and sometimes provides parameters for the method to use.

Someone recently wrote that an object-oriented program consists simply of a bunch of objects laying around sending messages to one another. This might be a slight exaggeration, but is not too far from the truth.



Olexiy Ye. Tykhomyrov 2001-12-16