Class-based programming: Difference between revisions

Content deleted Content added
m top: ce: case
No edit summary
Line 2:
{{Programming paradigms}}
 
'''Class-based programming''', or more commonly '''class-orientation''', is a style of [[object-oriented programming]] (OOP) in which [[inheritance]] occurs via defining ''[[class (computer programming)|class]]es'' of [[object (computer science)|object]]s, instead of inheritance occurring via the objects alone (compare [[prototype-based programming]]).
 
The most popular and developed model of OOP is a class-based model, instead of an object-based model. In this model, objects are entities that combine ''[[state (computer science)|state]]'' (i.e., data), ''[[behavior]]'' (i.e., procedures, or ''[[method (computer science)|method]]s'') and ''[[identity (object-oriented programming)|identity]]'' (unique existence among all other objects). The structure and behavior of an object are defined by a [[class (object-oriented programming)|class]], which is a [[definition]], or [[blueprint]], of all objects of a specific type. An object must be explicitly created based on a class and an object thus created is considered to be an [[instantiation (computer science)|instance]] of that class. An object is similar to a [[data structure|structure]], with the addition of method pointers, member access control, and an implicit data member which locates instances of the class (i.e., objects of the class) in the class hierarchy (essential for runtime inheritance features).