Derived Class

What Does Derived Class Mean?

A derived class is a class created or derived from another existing class. The existing class from which the derived class is created through the process of inheritance is known as a base class or superclass.

Advertisements

Derived classes are used for augmenting the functionality of base class by adding or modifying the properties and methods to suit the requirements of the specialization necessary for derived class. This allows for defining virtual methods that form the means to implement polymorphism, which allows a group of objects to work in uniform manner. Thus, the inherent advantages of inheritance and polymorphism like code reuse, faster development, easy maintenance, etc., are realized.

A derived class is also known as subclass or child class.

Techopedia Explains Derived Class

The hierarchical relationship between derived class and base class is known as an “is a” relationship. For example, consider a base class, LivingBeing, which is used to create two derived classes, Plant and Animal. Plant is a LivingBeing and Animal is a LivingBeing. Both have few common features but each type can have features that are unique to its specialization and are different from the features of the base class.

While inheriting from base class, the derived class implicitly inherits all the members (except constructors and destructors), which it reuses as it extends and modifies the behavior of the base class. The derived class overrides the properties and methods of the base class so that it represents the specialized version of base class.

Advertisements

Related Terms

Latest DevOps Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…