ENCAPSULATION
Encapsulation
when we talking about this its simple idea we can remind capsules
which we using to take as medicine.mainly here what they doing is protecting
the things inside from the outside world.This will keep contain together also
it will protect the contents inside.
In OOP it will take attributes & behaviors & it will bundle together in same unit as class.after encapsulate your class we cant access to this class without having particular behaviors.It will help to control outside access & keep security of data.
In OOP it will take attributes & behaviors & it will bundle together in same unit as class.after encapsulate your class we cant access to this class without having particular behaviors.It will help to control outside access & keep security of data.
Here we will open inputs & outputs to outside but
without using input you cant change inside details.this is simple example for Encapsulation.
No comments:
Post a Comment