Encapsulation in Object Oriented Programming
Encapsulation is one of the main pillars of object oriented programming (OOPs) in which we bundles the attributes (data) and the functions (methods) that operate on that data within the class. It help in data hiding and abstraction , making our code more organized, secure & reusable. The following image may be helpful in understanding…