openobject.org

Object Oriented Systems

From Physical Programming

Object Oriented Systems are collections of interconnected objects. Each object is capable of receiving input, processing data, and producing output. An objects output may be a change in its state or a message to another object or group of objects (in reality a change of state often acts as a form of communication).

Each object in an object oriented system can be viewed as an independent mechanism with distinct roles and/or behaviour. Objects interact with each other to produce complex relations, the behaviour that is produced through this interaction can be thought of as emergent.

Structure
A number of structuring methods can be used to construct or analyse object oriented systems. Object oriented programming often uses the following basic concepts.

Class
Objects can be divided into different classes, these classes define the basic characteristics of the object. For example, the class Bird may include all objects that have the property of feathers and wings, and have the ability to fly. Classes provide modularity to the system. Generally the properties defined by a class are called its members, i.e. feathers would be a member of the class Bird. Classes can also have subclasses. The Bird class may have a sub-class called Parrot.

Object
The object is a particular instance of a class. For example the object Polly would be an instance of the class Bird (and the sub-class Parrot). Objects inherit the member qualities from the class they belong to. For example, Polly would inherit the member qualities of the Bird class, Polly would have feathers and wings and the ability to fly. An object may also have qualities that are unique; Polly may be able to say "Polly wants a cracker", where other objects in the class Bird can not.

Method
Method is the way an object performs its given functions. Polly has the ability to fly, how Polly flies is defined by the method fly( ). All objects in the class Bird may have the method fly( ) however each object may implement this method in a different way. The object Penguin may implement the method fly( ) under water.

Message Passing
This is the process by which objects send data to each other or ask each other to perform a certain function. This is sometimes referred to as "calling a method".

A user or programmer of an object oriented system does not need to know the internal functioning of every object in the system, they simply need to know the methods required to produce the behaviour they want, i.e. what methods to call.


This text is based of the Wikipedia entry for object-oriented programming accessed 13th March 2008.