Lecture overview -- Keyboard shortcut: 'u'  Previous page: Extension of Classes [Section] -- Keyboard shortcut: 'p'  Next page: An example of simple extension -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Specialization, Extension, and Inheritance - slide 10 : 40

Extension of Classes

Classes can both be regarded as types and modules.

Class extension is a program transport and program reusability mechanism.

If class B is an extension of class A then

  • B may add new variables and operations to A
  • Operations and variables in A are also present in B
  • B-objects are not necessarily conceptually related to A-objects