In our everyday life, many of us oftentimes try to hide information from other people. In many situations, the information hiding is an essential part of our life. For example, when we go grocery shopping, do we allow the store clerk to withdraw money from our wallet? The wallet (which is an object in object-oriented terms) hides money (which is the information or attribute/field of an object) from outsiders. A wallet may provide a method called “pull out X dollars” that, when executed by an outside object, results in handing over X dollars to the caller without disclosing how much money is in it. This is called information hiding in object-oriented programming.
Liked By
Write Answer
What is a information hiding in object oriented programming
Join MindStick Community
You have need login or register for voting of answers or question.
Barbara Jones
08-Nov-2016In our everyday life, many of us oftentimes try to hide information from other people. In many situations, the information hiding is an essential part of our life. For example, when we go grocery shopping, do we allow the store clerk to withdraw money from our wallet? The wallet (which is an object in object-oriented terms) hides money (which is the information or attribute/field of an object) from outsiders. A wallet may provide a method called “pull out X dollars” that, when executed by an outside object, results in handing over X dollars to the caller without disclosing how much money is in it. This is called information hiding in object-oriented programming.