Object-Oriented Programming

Inheritance

English

Overview

A mechanism for creating a new class by carrying over the functionality of an existing one.

Details

A mechanism where a new class (child) is defined by carrying over the fields and methods of an existing class (parent). It's convenient for reusing implementation, but it tends to create tight coupling between parent and child, and reuse via composition (delegation) is often recommended instead.

More Programming terms