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

Let us understand the major reason why multiple inheritance is considered problematic

Class B is a subclass of class A

  • Concrete problem

    • In a C object ac: Which x does ac.x refer to?

  • General problems

    • The name clash problem: Does x in C refer to the x in A or the x in B?

    • The combination problem: Can x in A and x in B combined to a single x in C?

    • The selection problem: Do we have means in C to select either x in A or x in B?

    • The replication problem: Is there one or two x pieces in C?