Software Engineering for Self-Directed Learners ยป

Can explain the encapsulation aspect of OOP

Paradigms โ†’ OOP โ†’ Objects โ†’

Encapsulation of objects

Encapsulation protects an implementation from unintended actions and from inadvertent access.
-- Object-Oriented Programming with Objective-C, Apple

An object is an encapsulation of some data and related behavior in terms of two aspects:

1. The packaging aspect: An object packages data and related behavior together into one self-contained unit.

2. The information hiding aspect: The data in an object is hidden from the outside world and are only accessible using the object's interface.

Exercises