Classes: Difference between revisions
Content deleted Content added
No edit summary |
Interwiki |
||
Line 3: | Line 3: | ||
[[Category:Type System]] |
[[Category:Type System]] |
||
[[Category:Encyclopedia]] |
[[Category:Encyclopedia]] |
||
In [[object-oriented programming]] '''class''' is a set (a [ |
In [[object-oriented programming]] '''class''' is a set (a [[wp:Transitive_closure|transitive closure]]) of types bound by the relation of [[inheritance]]. It is said that all types derived from some base type T and the type T itself form a class T. The first type T from the class T sometimes is called the '''root type''' of the class. |
||
A class of types itself, as a type, has the values and operations of its own. The operations of are usually called '''methods''' of the root type. Both operations and values are called [[polymorphism | polymorphic]]. |
A class of types itself, as a type, has the values and operations of its own. The operations of are usually called '''methods''' of the root type. Both operations and values are called [[polymorphism | polymorphic]]. |