أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
this is encapsulation. the most effective one is when you hide type.
Agreed with the experts that it is the concept of Encapsulation in Object Oriented Design.
Also being methods and members wrapped in a container, you can use your methods to change your members as per the needs and specific requirements thereby you can say what you hide you can change.
My2 cents. Thanks.
Offcourse this is "Encapsulation".
Agree with @Mohammad Shalabi