12

Inheritance

LEARNING OBJECTIVES

At the end of this chapter, you should be able to

  • Use inheritance to extend a new class from the existing classes.
  • Understand the types of inheritances and concepts therein.
  • Understand the concepts of ADT, virtual functions, and dynamic data binding.

12.1 Introduction

The concept of inheritance is not new to us. We inherit property, goodwill and name from our parents. Similarly, our descendants will derive these qualities from us. Reusability of code is one of the strong promises that are made by C++ and inheritance is the tool selected by C++ to fulfill this promise. In this chapter, we take you through inheritance and its properties and rules. We will dwelve into the terminology of inheritance and the ...

Get Object-oriented Programming Using C++ and Java 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.