by Dinesh Thakur

The encapsulation is achieved by combining the methods and attribute into a class.The class acts like a container encapsulating the properties. The users are exposed mainly public methods.The idea behind is to hide how thinigs work and just exposing the requests a user can do.