Content deleted Content added
No edit summary |
m Removed gibberish |
||
Line 1:
▲, A '''method''' in [[object-oriented programming]] (OOP) is a [[Procedure (computer science)|procedure]] associated with a [[Message passing|message]] and an [[Object (computer science)|object]]. An object consists of data and behavior. The data and behavior comprise an interface, which specifies how the object may be utilized by any of various consumers<ref name="consumerdef001a">Consumers of an object may consist of various kinds of elements, such as other programs, remote computer systems, or computer programmers who wish to utilize the object as part of their own programs.</ref> of the object.
Data is represented as [[Property (programming)|properties]] of the object and behaviors are represented as methods of the object. For example, a <code>Window</code> object could have methods such as <code>open</code> and <code>close</code>, while its state (whether it is opened or closed at any given point in time) would be a property.
|