2. Characteristics of Object
•Information Hiding
•Information is stored within the
object.
•It is hidden from the outside world.
•Only the object can manipulate on it.
•E.g. Ali’s name is stored in his brain
3. Characteristics of Object
•Advantages of Information Hiding
•Simplifies the model by hiding the
implementation details.
•It is a barrier against change propagation
4. Characteristics of Object
•Encapsulation
•The data and the behavior are tightly coupled
inside an object
•Both the information structure and
implementation details of its operations are
hidden from outside world.
8. Object has an interface
•An object encapsulates data and behavior
•So how does objects interacts with each
other?
•Each object provides an interface
(operations)
•Other objects communicates through this
interface
9. Examples: Interface of car
•Steer wheels
•Accelerate
•Change gear
•Apply brakes
•Turn light on/off
10. Separation of interface and implementation
•It means change in implementation
does not effect object interface.
•This is achieved via principles of
information hiding and
encapsulation.