Object-oriented

From Computer History Wiki
Jump to: navigation, search

Object-oriented is a style of programming, programming languages, and system organization. The program/sysem contains objects, which all have a type; all the objects of a particular type are said to form a class. The objects contain state (sometimes known as attributes), and those in a given class have a set of procedures (sometimes known as methods) associated with that type of object, which are supposed to be the only places that know what is inside an object of that type.

One advantage of object-oriented code is that if a change is made to how the object represents its state, the number of places that know about how the state is arranged and manipulated is limited, and easily found, making changes much less likely to introduce subtle bugs. Another is that the set of operations which can happen to an object is strictly defined; again, reducing the chances of errors.

An important aspect provided by languages that support object-oriented mechanisms is inheritability - a new class of object may be defined which 'inherits' methods from a more basic class. This encourages code re-use, since once a particular useful class is defined, it can be used in other, more complex, classes.

See also