Encapsulation

This lesson shows us how to implement the first component of data hiding: encapsulation.

A Real Life Example

For the sake of explanation, we’ll start off by creating a simple movie class which contains three members:

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy