Introduction to Object-oriented Programming
- slide 12 : 22
Action on objects
Ask not what the system does: Ask what it does it to!
[Bertrand Meyer]
Actions in general
Implemented by procedure calls
Often, but not always, with parameters
Actions on objects
Activated via messages
A message always has a receiving object
A message is similar to a procedure calls with at least one actual parameter
A message activates an operation (a method)
The receiving object locates the best suited operation as responder (method lookup)