Uncommon · Knowledge
Inheritance (object-oriented programming)
Concept in object-oriented programming
In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object (prototype-based inheritance) or class (class-based inheritance), retaining similar implementation. It is also defined as deriving new classes (sub classes) from existing ones such as super class or base class and then forming them into a hierarchy of classes.
From Wikipedia
In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object (prototype-based inheritance) or class (class-based inheritance), retaining similar implementation. It is also defined as deriving new classes (sub classes) from existing ones such as super class or base class and then forming them into a hierarchy of classes. In most class-based object-oriented languages like C++, an object created through inheritance, a "child object", acquires all the properties and behaviors of the "parent object", with the exception of: constructors, destructors, overloaded operators and friend functions of the base class. Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces. The relationships of objects or classes through inheritance give rise to a directed acyclic graph. An inherited class is called a subclass of its parent class or super class. The term inheritance is loosely used for both class-based and prototype-based programming, but in narrow use the term is reserved for class-based programming (one class inherits from another), with the corresponding technique in prototype-based programming being instead called delegation (one object delegates to another). Class-modifying inheritance patterns can be pre-defined according to simple network interface parameters such that inter-language compatibility is preserved. Inheritance should not be confused with subtyping. In some languages, generally statically-typed class-based OO languages, like C++, C#, Java, and Scala, inheritance and subtyping agree, whereas in others they differ. In general, subtyping establishes an is-a relationship, whereas inheritance only reuses implementation and establishes a syntactic relationship, not necessarily a semantic relationship (inheritance does not ensure behavioral subtyping). To distinguish these concepts, subtyping is sometimes referred to as interface inheritance (without acknowledging that the specialization of...
Text: Wikipédia, CC BY-SA 4.0. · Image: Piervit (CC BY-SA 3.0) ·
Related cards
-
P★
Programming idiom
Recurring construct of code in some programming language
-
★★
Object Pascal
Branch of object-oriented derivatives of Pascal programming language
-
★★
Decorator pattern
Design pattern in object-oriented programming
-
O★
Overhead (computing)
Any combination of excess or indirect computation time, memory, bandwidth, or other resources that are required to perform a specific task
-
★
Firstborn
First offspring of someone
-
★★★
Encapsulation (computer programming)
Language mechanism in programming languages that allows external code not to care about the internal workings of an object
-
i★★
inheritance in the Netherlands
All of belongings and debts a person leaves behind after deceaving | legal situation in The Netherlands
-
l★★
legal succession
Aspect of inheritance law in Russia and the Soviet Union
-
L★★
Lineal descendant
Blood relative in the direct line of descent
-
e★★
entity
A concept in computing
-
★★★★
Inbreeding
Production of offspring from closely related organism
-
A★★★★
Archetype
Model pattern from which other objects, ideas or concepts are derived
-
D★
Dynamic dispatch
Process of selecting which implementation of a polymorphic operation (method or function) to call at run time
-
★
Object–relational database
Database management system
-
★★★
Aristocracy (class)
A person who either possesses hereditary titles granted by a monarch or is related to such people
-
C★★
Compiled language
A programming language implemented with a compiler that translates source code into a binary executable form
-
J★★★★
Java (programming language)
Object-oriented programming language
-
★★★★
Surname
Human name used in combination with given name(s) used to indicate association, often a family name or a name indicating place of origin