Class-based programming: Difference between revisions

Content deleted Content added
No edit summary
Line 10:
 
==Inheritance==
{{mainMain|Inheritance (object-oriented programming)|l1=Inheritance}}
 
In class-based programming, [[inheritance (object-oriented programming)|inheritance]] is done by defining new classes as [[Extension (semantics)|extensions]] of existing classes: the existing class is the [[parent class]] and the new class is the [[Subclass (computer science)|child class]]. If a child class has only one parent class, this is known as ''[[single inheritance]],'' while if a child class can have more than one parent class, this is known as ''[[multiple inheritance]].'' This organizes classes into a [[hierarchy]], either a ''[[Tree (set theory)|tree]]'' (if single inheritance) or ''[[Lattice (order)|lattice]]'' (if multiple inheritance).
Line 25:
 
See also a [[:Category:Class-based programming languages|list of class-based programming languages]].
 
==References==
 
{{Reflist}}
 
==See also==
*[[Prototype-based programming]] (contrast)
*[[Programming paradigm]]s
*[[classClass (computer science)]]
 
==References==
{{Reflist}}
 
{{Programming language}}