O'Reilly logo

Learning Object-Oriented Programming by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Inheritance and Specialization

In this chapter, we will create a hierarchy of blueprints that generate objects. We will take advantage of inheritance and many related features to specialize behavior in each of the three covered programming languages. We will:

  • Use classes to abstract behavior
  • Understand the concept of simple inheritance and design a hierarchy of classes
  • Learn the difference between overloading and overriding methods
  • Understand the concept of overloading operators
  • Understand polymorphism
  • Take advantage of the prototype chain to use inheritance in JavaScript

Using classes to abstract behavior

So far, we have been creating classes on Python and C# to generate blueprints for real-life objects. In JavaScript we have been using constructor ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required