Lecture overview -- Keyboard shortcut: 'u'  Previous page: Class hierarchies and Inheritance -- Keyboard shortcut: 'p'  Next page: Problems with multiple inheritance -- 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 18 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Multiple inheritance

Why should we care about multiple inheritance?

  • Specialization of two or more classes

    • Example: An isosceles right triangle is a isosceles triangle and it is a right triangle

    • Example: There may exists a bank account which is a checking account and it is a savings account

  • Extensions of two or more classes

    • "Program transport" from multiple superclasses