2. Abstraction
⢠The main purpose of using the abstraction
mechanism is to consider only those aspects of
the problem that are relevant to given purpose
⢠To suppress all aspects of the problem that are
not relevant.
⢠Feature Abstraction
⢠Data Abstraction
3. ⢠Feature Abstraction
ď A class hierarchy can be viewed as defining
several levels of abstraction, where each class is
an abstraction of its subclasses.
ď The class is a simplified(abstract) representation
of its derived classes and retains only those
features that common to all its children classes
and ignores the rest of the features.
ď Thus, the inheritance mechanism can be thought
of as providing feature abstruction
4. ⢠Data Abstraction
ď An Object itself can be considered as a data
abstraction entity.
ď Its abstract out the exact way in which it stores
its various private data items.
ď Provides a set of methods to other object to
access and manipulate these data items.
ď Data Abstraction implies that each object hides
from other object the exact way in which it stored
its internal information is organized and
manipulated.
⢠Abstraction is a powerful mechanism for
reducing the perceived complexity of
software design.
5. Encapsulation
⢠The data of an object is encapsulated within its
methods.
⢠To access the data internal to an object, other
object have to invoke its methods, and cannot
directly access the data.
6. ⢠Encapsulation offers three important advantage
as follows:
ď Protection from unauthorized data access:
It protects an objectâs variable from corruption by
other objects. Like : Unauthorized access,
Concurrent Access to data such as deadlock and
inconsistent values.
ď Data Hiding
Hides the internal structure of an object so that all
interactions with the object are simple and
standardized.
ď Weak Coupling
Enhance understandability of design.
7. Polymorphism
⢠Poly(Many)+ morphism(Forms).
⢠Polymorphism denotes that a method may
respond differently.
⢠Depends on the exact polymorphic method that
is bound.
⢠The parameters of methods would have to be
different for the object to respond differently.
8. Polymorphism can be:
⢠Static Polymorphism
ď The same method call results inn different
actions depending on parameter type.
ď Known as Static Binding.
⢠Dynamic Polymorphism
ď Address of invoked method can be known only
at run time.
ď Dynamic binding occurs when methods of the
base class overridden by the derived classes
and instances of derived classes are stored in
the instances of the base class.
9. Related Technical Terms
⢠Persistence
ď Objects Usually get destroyed once a program
finishes.
ď Persistent Objects are stored permanently.
⢠Agents
ď A passive object is one that performs some
action only when requested through invocation of
some of its methods.
ď An Agent(Active Object) monitors events
occurring in the application and take action.
ď Used in applications for monitoring excptions.
10. ⢠Widgets
ď Stands for Window Object.
ď Is a Primitive Object used for Graphical User
Interface(GUI) design.
ď Complex GUI Widgets can be derived by basic
Widgets using inheritance mechanism.
ď Maintains the internal data such as the
geometry of window, background & forground,
cursor, size, etc.
ď Widgets are becoming the standard Component
of GUI design.
11. Advantage of OOD
The main reason for the popularity of OOD is that
it hold the following promises.
⢠Code and design reuse.
⢠Increased Productivity
⢠Ease of testing and maintenance
⢠Better code and design understandability.
12. The Chief Advantage of OOD is
improved productivity
⢠Code reuse by the use of redeveloped class
libraries.
⢠Code reuse due to inheritance.
⢠Simpler and more intuitive abstraction
⢠Better Problem Decomposition.