GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS

 Print  |  
Question:  Explain the Encapsulation principle

Answer: Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.


September 09, 2006 17:40:40 #5
 RAJEEV16706   Member Since: September 2006    Total Comments: 7 

RE: Explain the Encapsulation principle
 

THE SINGLE MOST IMPORTANT FACTOR THAT DISTINGUISHES A WELL DESIGNED MODULE FROM A POORLY DESIGNED ON IS THE DEGREE TO WHICH THE MODULE HIDES ITS INTERNAL DATA AND OTHER IMPLEMENTAION DETAIL FROM OTHER MODULES.

A WELL DESIGNED MODULE HIDES ALL OF ITS IMPLEMENTAION DETAILS, CLEANLY SEPARATIONG ITS API FROM ITS IMPLEMENTAION.

AND INFORMATION HIDING OR ENCAPSULATION IS THE BEST WAY TO SEPRATE OUT DIFFERENT MODULE.

SO THIS PEOMOTE THE MODULER DEVELOPEMENT OF ANY PROJECT.

     

 

Back To Question