Search⌘ K

Subtypes

Explore the concept of subtypes and inheritance as foundational principles in object-oriented programming. Understand how subtypes inherit attributes and constraints from supertypes and how specialization defines new object types with specific features. This lesson helps you grasp multiple inheritance, class hierarchies, and how to model these relationships effectively in JavaScript applications.

We'll cover the following...

The concept of a subtype, or a subclass, is a fundamental concept in natural language, mathematics, and informatics. For instance, in English, we say that a bird is an animal, or the class of all birds is a subclass of the class of all animals. In linguistics, the noun “bird” is a hyponym of the noun “animal.”

An object type may be specialized by subtypes, for instance, bird is specialized by parrot, or generalized by supertypes, such as bird and ...