Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is encapsulation?

Answers were Sorted based on User's Feedback



What is encapsulation?..

Answer / abalonesoft

Preventing unauthorized access to some piece of information
or functionality.

The key money-saving insight is to separate the volatile
part of some chunk of software from the stable part.
Encapsulation puts a firewall around the chunk, which
prevents other chunks from accessing the volatile parts;
other chunks can only access the stable parts. This prevents
the other chunks from breaking if (when!) the volatile parts
are changed. In context of OO software, a "chunk" is
normally a class or a tight group of classes.

The "volatile parts" are the implementation details. If the
chunk is a single class, the volatile part is normally
encapsulated using the private and/or protected keywords. If
the chunk is a tight group of classes, encapsulation can be
used to deny access to entire classes in that group.
Inheritance can also be used as a form of encapsulation.

The "stable parts" are the interfaces. A good interface
provides a simplified view in the vocabulary of a user, and
is designed from the outside-in (here a "user" means another
developer, not the end-user who buys the completed
application). If the chunk is a single class, the interface
is simply the class's public member functions and friend
functions. If the chunk is a tight group of classes, the
interface can include several of the classes in the chunk.

Designing a clean interface and separating that interface
from its implementation merely allows users to use the
interface. But encapsulating (putting "in a capsule") the
implementation forces users to use the interface.

Is This Answer Correct ?    2 Yes 0 No

What is encapsulation?..

Answer / srinidhi

integrate a related data to form a single unit this is
encapsulation this is possible by using structures

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

How can I access memory located at a certain address?

3 Answers   Verizon,


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

0 Answers   TISL,


What is the Lvalue and Rvalue?

2 Answers  


What type of function is main ()?

0 Answers  


Why clrscr is used in c?

0 Answers  


How is a pointer variable declared?

0 Answers  


Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code

1 Answers  


What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }

4 Answers   ADITI,


can u give me the good and very optimised code for a car racing game?

0 Answers  


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

1 Answers   CMS,


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

0 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

2 Answers   HCL, IBM, Satyam, Vimal, Vimukti Technologies,


Categories