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 and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 10 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Extension of Classes

Classes can both be regarded as types and modules.

Class extension is a program transport and program reusability mechanism.

The class B is a specialization of class A

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