Chapter 13. Advanced OOP – Inheritance and Polymorphism

In this chapter, we will further extend our knowledge of OOP by looking at the slightly more advanced concepts of inheritance and polymorphism. We will then be able to use this new knowledge to implement the star characters of our game, Thomas and Bob. Here is what we will cover in this chapter in a little more detail:

  • How to extend and modify a class using inheritance?
  • Treating an object of a class as if it is more than one type of class by using polymorphism
  • Abstract classes and how designing classes that are never instantiated can actually be useful
  • Building an abstract PlayableCharacter class
  • Puting inheritance to work with Thomas and Bob classes
  • Adding Thomas and Bob to the game project

Inheritance ...

Get Beginning C++ Game 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.