0% found this document useful (0 votes)
6 views10 pages

Principles of Object-Oriented Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

Principles of Object-Oriented Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Principles of Object-Oriented Systems

 Abstraction
 Encapsulation
 Modularity
 Hierarchy
ABSTRACTION :

Abstraction lets you focus on essential aspects of an application while ignoring


details. This means focusing on what an object is and does, before deciding how
to implement it.
 Data Abstraction : When the object data is not visible to the outer world, it
creates data abstraction. If needed, access to the Objects’ data is provided
through some methods.
 Process Abstraction :We don’t need to provide details about all the functions
of an object. When we hide the internal implementation of the different
functions involved in a user operation, it creates process abstraction.
Examples for abstraction :

 Example 1: When we derive a car, we do not know how is the car


moving or how internal components are working , But we know how to
drive a car. It means it is not necessary to know how the car is working, but
it is important how to derive a car. The same is an abstraction.
 Example 2: When a class Student is designed, the attributes enrolment
number , name, course, and address are included while characteristics like
pulse rate and size of shoe are ignored, since they are irrelevant in the
perspective of the educational institution.
Encapsulation :

Encapsulation is the process of binding both attributes and methods


together within a class. Through encapsulation, the internal details
of a class can be hidden from outside. The class has methods that
provide user interfaces by which the services provided by the class
may be used.
Example for encapsulation :

 In a large organization, there are several departments like sales, accounts,


production, etc., each with its own responsibilities and functions. Now,
consider a situation where a member of the accounts section needs all the
sales data of a particular month. In such a case, the accounts official cannot
access the sales data directly. Instead, they have to contact some member of
the sales department and request them to furnish the required data. Thus, the
situation here is similar to encapsulation, where the sales data and the
officials who can directly access them are wrapped under a single domain,
“Sales Department.”
Modularity :

The module simply means the software components that are been
created by dividing the software. The software is divided into various
components that work together to form a single functioning item but
sometimes they can perform as a complete function if not connected
with each other. This process of creating software modules is known
as Modularity in software engineering.
Example for modularity:

 A house or apartment can be viewed as consisting of several


interacting units; electrical, heating, cooling, plumbing, structure,
etc. Rather than viewing it as one giant jumble of wires, vents,
pipes, and boards, the organized architect designing a house or
apartment will view them as separate modules that interact in
well-defined ways are modules.
HIERARCHY :

Hierarchy is the ranking or ordering of abstraction”. Through


hierarchy, a system can be made up of interrelated subsystems,
which can have their own subsystems and so on until the
smallest level components are reached.
Example for hierarchy :

 If we derive a class Rose from a class Flower, we can say that a


rose “is–a” flower. “PART–OF” hierarchy − It defines the
hierarchical relationship in aggregation by which a class may be
composed of other classes. For example, a flower is composed of
sepals, petals, stamens, and carpel.
THANK YOU

You might also like