Chapter 5. Interfaces, Multiple Inheritance, and Composition

In this chapter, we will work with more complex scenarios in which we have to use instances that belong to more than one blueprint. We will use the different features included in each of the three covered programming languages to code an application that requires the combination of multiple blueprints in a single instance. We will:

  • Understand how interfaces work in combination with classes
  • Work with multiple inheritance of classes in Python
  • Take advantage of abstract base classes in Python
  • Work with interfaces and multiple inheritance in C#
  • Implement interfaces in C#
  • Work with composition in JavaScript

Understanding the requirement to work with multiple base classes

We have to work with two ...

Get Learning Object-Oriented Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.