Encapsulation

Encapsulation is a software design principle that states that access to objects should be independent of how they are used. This allows you to create objects that can be used regardless of how they were created. In a programming context, encapsulation can be thought of as a way to hide the implementation details of an object from its users.

Encapsulation in programming means sharing all the properties and methods of one object with another object, creating an object that has properties and behavior distinct from those objects. This principle encourages objects to be independent modules, combining data and processing procedures that operate only within the object shell.

Example

As an example, let's consider this scenario: you have a class `Computer` with attributes and methods such as properties of the processor (`processorPower`), RAM (`ramCapacity`), hard drive (`hardDriveSize`), etc. You can also have other classes like `