GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 11 of 203    Print  
What is encapsulation?
Packaging an object’s variables within its methods is called encapsulation.
 


  
Total Answers and Comments: 6 Last Update: December 16, 2006   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: priya
 
the wrapping up of data and functions into a single unit is called as encapsulation.e.g: class friend{ int infinte friends; public: int mysoul();}

Above answer was rated as good by the following members:
yzesong
September 08, 2005 08:20:25   #1  
vishnu bobade        

RE: What is encapsulation?
Classes in C++ provide static encapsulation of objects by generating code which contains specific knowledge about the internals of encapsulated objects. Static encapsulation occurs at compile time and therefore cannot directly support the evolution of objects since recompilation of source code is required if the internal layout changes. This also prohibits the use of distributed or persistent objects without first ensuring that the internal representations of the objects match the ones in the compiled code
 
Is this answer useful? Yes | No
January 17, 2006 03:55:08   #2  
v.chandrasekhar        

RE: What is encapsulation?
1.The wrapping up of data and member function into a single unit is called encapsulation.2.The data is not accessible to the outside world and only those functions which are wrapped into a class can access it.
 
Is this answer useful? Yes | No
March 05, 2006 00:03:43   #3  
priya        

RE: What is encapsulation?
the wrapping up of data and functions into a single unit is called as encapsulation.e.g: class friend{ int infinte friends; public: int mysoul();}
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 04, 2006 07:32:06   #4  
dngr_dv Member Since: April 2006   Contribution: 3    

RE: What is encapsulation?

hi

Binding several related variables and member functions as a single unit is called data encapsulation. This job has been done by class keyword.

Thanks....


 
Is this answer useful? Yes | No
April 09, 2006 00:34:32   #5  
sunil        

RE: What is encapsulation?

hi!

Encapsulation means wrapping up of Data and Code...this is what i got from data structures book...


 
Is this answer useful? Yes | No
December 16, 2006 02:50:01   #6  
jha        

RE: What is encapsulation?
According to me encapsulation is the process in which we can collect the data members and functions in one place or we can say that to encapsulate the related things.
 
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