Encapsulation in C++
Encapsulation in C++ is one of the oops concepts, due to this feature our code make more secure, encapsulation is achieved in C++ by using public and private keywords,A real-life example of encapsulation
Generally, we use a capsule as a real-life example of encapsulation. In encapsulation, we bind data and methods in a single unit.
Another real-life example of encapsulation is the pen, in pen, cap, and part of the pen and combined with each other, in another word they are encapsulated.
I hope this article is helpful to you.
Another real-life example of encapsulation is the pen, in pen, cap, and part of the pen and combined with each other, in another word they are encapsulated.
I hope this article is helpful to you.
No comments:
Post a Comment