Encapsulation
Encapsulation is a fundamental principle of Object-Oriented Programming (OOP). It involves bundling data and the methods that operate on that data into a single unit, typically a Class. This practice facilitates Data Hiding, which protects the internal state of an Object from unauthorized access. By restricting direct access to class members, Encapsulation ensures that an object's integrity is maintained.
In languages like Java, C++, and Python, Encapsulation is achieved through the use of access modifiers like private, protected, and public. These modifiers control the visibility of Member Variables and methods. For example, using Getter and Setter methods allows for controlled interaction