Next: Classes of `animal-shelter' application
Up: 2nd example of object
Previous: 2nd example of object
This examples illustrates the following concepts of oop-technology:
Attributes of an object are protected from public access. They can only be accessed indirectly
through a method dispatcher of the object.
- inheritance implemented by the message passing programming pattern
- IS-relationship between classes
The classes `dog' and `cat' are derived from the class `animal' etc.
- HAS-relationship between classes
An object of the class `animal-shelter' has instances of class `animal'.
An object of the class `dog' responds to the same message `who-are-you' differently from
an instance of the class `cat'.
Georg P. Loczewski