<- People Behind Informatics


All 0-9 A B C D E F G H I J K L M N O P Q R S T U V W XY Z




 
Objects
Objects in programming languages are collections of operations that share a state. The operations determine the messages (calls) to which the object can respond, while the shared state is hidden from the outside world and is accessible only to the object's operations. Variables representing the internal state of an object are called instance variables and its operations are called methods. The collection of methods of an object determines its interface and its behavior: name: object local instance variables (shared state) operations or methods (interface of message patterns to which the object may respond) An object named point with instance variables x, y and methods for reading and changing them may be defined as follows: point :object x:=0; y:=0; read-x: x; -return value of x read-y: y; -return value of y change-x (dx) : x :=x + dx; change-y (dy) : y : = y + dy ; The object point protects its instance variables x, y against arbitrary access, allowing access only through messages to read and change operations. The object's behavior is entirely determined by its responses to acceptable messages and is independent of the data representation of its instance variables. Moreover, the object's knowledge of its callers is entirely determined by its messages. Object-oriented message-passing facilitates two-way abstraction: senders have an abstract view of receivers and receivers have an abstract view of senders. [Source: Encyclopedia of Computer Science, Fourth Edition, Anthony Ralston, Edwin D. Reilly, David Hemmendinger]
 

 

<- People Behind Informatics


Home  |  Top  |  Search  |  Gallery  | Glossary  | Sitemap  |  Making Of  |  Help