Now, let us discuss about the basic characteristics around which object oriented
systems are developed.
Abstraction
Abstraction is one of the very important concepts of object oriented systems
Abstraction focues on the essential, inherent aspects of an object of the system. It does
not represent the accidental properties of the system. In system development,
abstraction helps to focus on what an object is supposed to do, before deciding how it
should be implemented. The use of abstraction protects the freedom to make decisions
for as long as possible, by avoiding intermediate commitments in problem solving.
Most of the modern languages provide data abstraction. With the abstraction, ability
to use inheritance and ability to apply polymorphism provides additional freedom and
capability for system development. When you are using abstraction during analysis,
you have to deal with application-domain concepts. You do not have to design and
make implementation decisions at that point.
Encapsulation
Encapsulation, or information hiding, is the feature of separating the external aspects
of an object, from the internal implementation details of that object. It helps in hiding
the actual implementation of characteristics of objects. You can say that encapsulation
is hiding part of implementation that do internal things, and these hidden parts are not
concerned to outside world. Encapsulation enables you to combine data structure and
behaviour in a single entity. Encapsulation helps in system enhancement. If there is a
need to change the implementation of object without affecting its external nature,
encapsulation is of great help.
Polymorphism
Class hierarchy is the deciding factor in the case of more than one implementation of
characteristics. An object oriented program to calculate the area of different Figures
would simply call the Find_ Area operation on each figure whether it is a circle,
triangle, or something else. The decision of which procedure to use is made implicitly
by each object, based on its class polymorphism makes maintenance easier because
the calling code need not be modified when a new class is added.
Sharing of Structure and Behaviour One of the reasons for the popularity of object-oriented techniques is that they encourage sharing at different levels. Inheritance of both data structure and behaviour allows common structure (base class) to be used in designing many subclasses based
on basic characteristics of base class, and develop new classes with less effort.
Inheritance is one of the main advantages of any object oriented language, because it
gives scope to share basic code. In a broader way we can say that object oriented development not only allows information sharing and reuse within an application, but also, it gives a base for
project enhancement in future. As and when there is a need for adding new
characteristics in the system, they can be added as an extension of existing basic
features. This can be done by using inheritance, and that too, without major
modification in the existing code. But be aware that just by using object orientation
you do not get a license to ensure reusability and enhancement. For ensuring
reusability and enhancement you have to have a more general design of the system.
This type of design can be developed only if the system is properly studied and
features of proposed system are explored.
Emphasis on Object Structure, not on Operation Implementation
In object orientation the major emphasis is on specifying the characteristics of the
objects in a system, rather than implementing these characteristics. The uses of an
object depend highly on the facts of the application and regular changes during
development. As requirements extend, the features supplied by an object are much
more stable than the ways in which they are used, hence software systems built on
object structure are more secure.
While developing a system using the object oriented approach, main emphasis is on
the essential properties of the objects involved in the system than on the procedure
structure to be used for implementation. During this process what an object is, and its
role in system is deeply thought about.
No comments:
Post a Comment