OO Metaphors Home Page

List of OO Metaphors

A class can be thought to be a page in a blueprint book describing the contents and methods of objects in the class. The blueprint book has one sheet for each class.
An object is depicted as a watch panel where each member variable is represented within a monitor showing the value of the variable. Each member variable is represented with an image revealing its rolea.
An object that belongs to a subclass is a collection of stacked watch panels, one watch panel for each class.
A method is represented as a workshop that is attached to the invoked object. The workshop has room for parameters and local variables. An active workshop is colored red, as is the attached object, also.
Methods obtain their parameters from the calling method with the help of an envelope.
If a method returns some return value, the method workshop contains a workbench with an envelope on it waiting for the return value to be formed.
The main method exists throughout the whole execution of the program. Its metaphor is a workshop with a strong roof and a solid stone base.
An object reference is depicted with two pennants that have the same color.
A class variable is located in the blueprint sheet of the class.
Java has automatic garbage collection that destroys objects that are not referred to. It is depicted with a garbage vehicle that looks for watch panels with no pennants and destroys them.


Last updated: September 7, 2007

saja.fi@gmail.com