170k views
5 votes
What concept within object-oriented programming involves the restriction of the manipulation of an object's state by external users to a set of method calls?

User KitsuneFox
by
8.3k points

1 Answer

6 votes

Answer:

The concept of data encapsulation within object-oriented programming involves the restriction of the manipulation of an object’s state by external users.

Step-by-step explanation:

  • In the discipline of object-oriented programming, objects are nothing else but repositories of data existing in the form of fields.
  • Through data encapsulation, the vulnerable data is literally capsulated so that the object’s state cannot be manipulated by any agent working externally.
  • Hence, data encapsulation can be referred to as a secure procedure of safeguarding the objects (data repositories).
User Ridwan
by
7.4k points