Explain why encapsulation is required?

Showing Answers 1 - 15 of 15 Answers

kARUNA

  • Jul 23rd, 2007
 

The purpose of efficiency of memory and speed.
The data and code binds together.

  Was this answer useful?  Yes

Sivaramakrishnan Nagarajan

  • Oct 4th, 2007
 

To aviod propagation of changes. A tiny change in the code can propagate all through the code. But a change in a private member variable can mostly result only to change in that class and not the entire application.

  Was this answer useful?  Yes

sachinchakote

  • Nov 19th, 2007
 

Encapusulation is used just to bind together object properties ..
its help us store eveything related  to a class together and provide action to use them.
this has nothing to do with memory optimization

  Was this answer useful?  Yes

r v p

  • May 7th, 2008
 

Encapsulation is an OOP principle of placing the data and functionality within a single entity. This is so that all the functions that access the internal representation of the data type must be part of the data type definition.

  Was this answer useful?  Yes

Encpasulation is the process of packaging the classes into the public interfaces and private implementation, so that, any changes in the code will not effect the implmentation. The interfaces should be designed such that the actual implementation would not affected by any changes in the code.
Encapsulation dictates that one class must not have access to the private data of another class.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions