There are five key areas of Object Oriented Programming (OOP). These are
- Data Abstraction
- Data Encapsulation
- Modularity
- Polymorphism
- Inheritance
Data encapsulation means containing data by methods. Class methods manage and maintain the attributes of the class; maintaining data integrity.
If a class is distributed, then other users will not have to worry about the internals of the class. Methods can be updated and be made more efficient, but this is made transparent to the user as no change is required to their code.
Classes contain encapsulated data and custom methods