The roles of objects in messages
Objects may be
the sender of a message (in C++ / Java: not available to the target)
the target of a message
pointed to by a variable (attribute) within another object
pointed to by an argument passed back and forth in a message
Objects can play all these roles in their lifetime. However, some objects tend to always receive, while others almost always send.
Sender and Target are dependent on the message!
Pure OO (e.g. smalltalk) has only objects, no data. Even things like Integer are an object in smalltalk! However, in C++ we have to distinguigh between object and data. Data may
be contained in a variable
be passed back and forth as arguments
not be the sender of a message
not be the target of a message