Difference between revisions of "Class-based programming"
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) (→See also) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | '''Class-based programming''', or more commonly '''class-orientation''', is a style of [[object-oriented programming]] (OOP) in which inheritance is achieved by defining [[Class (computer programming|classes]] of [[Object (computer science)|objects]], as opposed to the objects themselves (compare [[Prototype-based programming]]). | + | '''Class-based programming''', or more commonly '''class-orientation''', is a style of [[object-oriented programming]] (OOP) in which inheritance is achieved by defining [[Class (computer programming)|classes]] of [[Object (computer science)|objects]], as opposed to the objects themselves (compare [[Prototype-based programming]]). |
== Description == | == Description == | ||
Line 19: | Line 19: | ||
* [[Object (computer science)]] | * [[Object (computer science)]] | ||
* [[Object-oriented programming]] (OOP) | * [[Object-oriented programming]] (OOP) | ||
+ | * [[Prototype-based programming]] (contrast) | ||
== External links == | == External links == |
Latest revision as of 08:11, 4 September 2016
Class-based programming, or more commonly class-orientation, is a style of object-oriented programming (OOP) in which inheritance is achieved by defining classes of objects, as opposed to the objects themselves (compare Prototype-based programming).
Description
The most popular and developed model of OOP is a class-based model, as opposed to an object-based model.
In this model, objects are entities that combine state (i.e. data), behavior (i.e. procedures, or methods) and identity (unique existence among all other objects)
The structure and behavior of an object are defined by a 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 instance of that class.
An object is similar to a structure, with the addition of method pointers, member access control, and an implicit data member which locates instances of the class (i.e. actual objects of that class) in the class hierarchy (essential for runtime inheritance features).
See also
- Class (computer programming)
- Computer programming
- Object (computer science)
- Object-oriented programming (OOP)
- Prototype-based programming (contrast)
External links
- Class-based programming @ Wikipedia