In procedural programming languages such as FORTRAN or Pascal, a program
consists of a procedural part and a data part. The procedural part consists
of the set of program instructions, and the data part, the numbers and
character strings that are manipulated by the instructions. Programs typically
contain several modules of instructions that perform computations on the
same data set. When some change is made to the format of the data, every
module that uses it must then be modified to accommodate the newly revised
format. This places a heavy burden on the software maintenance process
and makes these types of programs more prone to errors.
In an object-oriented system (OOS) the emphasis between data and procedures
is reversed. Data becomes the primary object and procedures are secondary
.For example, everything in the universe of an OOS is an object, and objects
are inaccessible to outside procedures. This form of structuring is sometimes
called Encapsulation or data hiding. It is a well known system design
principle used to make systems more modular and robust. With encapsulation,
objects are associated with their own procedures and, as such, are responsible
for their own actions. Thus, when some change is required in the data
or procedure, only the changed object need be modified.
|