GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 142 of 203    Print  
Explain why encapsulation is required?

  
Total Answers and Comments: 5 Last Update: May 08, 2009     Asked by: kaushal 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 23, 2007 13:39:09   #1  
kARUNA        

RE: Explain why encapsulation is required?

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


 
Is this answer useful? Yes | No
October 04, 2007 02:19:26   #2  
Sivaramakrishnan Nagarajan        

RE: Explain why encapsulation is required?
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.
 
Is this answer useful? Yes | No
November 19, 2007 12:32:31   #3  
sachinchakote        

RE: Explain why encapsulation is required?
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

 
Is this answer useful? Yes | No
May 07, 2008 14:53:50   #4  
r v p Member Since: May 2008   Contribution: 2    

RE: Explain why encapsulation is required?
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.
 
Is this answer useful? Yes | No
May 08, 2009 10:04:33   #5  
Niranjan.ambati Member Since: April 2009   Contribution: 4    

RE: Explain why encapsulation is required?
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.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape