Lecture overview -- Keyboard shortcut: 'u'  Previous page: An example of classes with inheritance -- Keyboard shortcut: 'p'  Next page: A general pattern of a class hierarchy with virtual methods -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 3 - Page 8 : 43
Programming Paradigms
Simulation of other Paradigms and Continuations
The interpretation of self

In order to obtain virtual methods of classes we need to alter the value of self in all superclasses

Two different interpretations of self . We see two linear class hierarchies. The class C inherits from B, which in turn inherits from A. And similarly, F inherits from E, which inherits from D. The one to the left - in the green class hierarchy - is the naive one we have obtained in our templates and examples until now. The one to the right - in the yellow class hierarchy, shows another interpretation of self . Following this interpretation, self at all levels refer to the most specialized object part.