Lecture overview -- Keyboard shortcut: 'u'  Previous page: Specialization of Classes [Section] -- Keyboard shortcut: 'p'  Next page: The extension of class specialization -- 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 2 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Specialization of Classes

Classes are regarded as types, and specializations as subtypes

Specialization facilitates definition of new classes from existing classes on a sound conceptual basis

 

The class B is a specialization of class A

If a class B is a specialization of a class A then

  • The instances of B is a subset of the instances of A
  • Operations and variables in A are also present in B
  • Some operations from A may be redefined in B