Lecture overview -- Keyboard shortcut: 'u'  Previous page: Inheritance in General [Section] -- Keyboard shortcut: 'p'  Next page: Interfaces to clients and subclasses -- 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 14 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Inheritance

Inheritance is a mechanism in object-oriented programming languages that facilitates class specialization and class extension

Two classes B and C that inherit from class A

  • The inheritance of B and C from A:

    • Organizes the classes in a hierarchy

    • Provides for some degree of specialization and/or extension of A

    • At program development time, data and operations of A can be reused in B and C without copying and without any duplication in the source program

    • At runtime, instances of class B and C are whole objects, without A parts