INTRODUCTION TO OBJECT ORIENTATION
Object Orientation is a term used to
describe the object – oriented(OO) method of building software. In an OO
approach, the data is treated as the most important element and it cannot flow
freely around the system.
Restrictions are placed on the number of
units that can manipulate the data. This approach binds the data and the
methods that will manipulate the data closely and prevents the data from being
inadvertently modified. The following figure shows the method1, method2,
method3, and method4.
The ‘object’ forms the basis around
which the following properties revolve:
1. Encapsulation
2. Abstraction,
Implementation Hiding
3. Inheritance,
dynamic binding, polymorphism
4. Overriding
and overloading
Encapsulation:
In
Object Orientation, a class is used as a unit to group related attributes and
operations together. The outside world can interact with the data stored in the
variables that represent the attributes of the class only through the
operations of that class. Thus, the operations act as interfaces of the object
of the class with the outside world.
For example, consider the class Employee
with attributes empID, empName and dateOfJoining with is given below
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.