Write a word doc about Encapsulation
Not what you're looking for?
Define Encapsulation in a detailed and provide a great deal of information in at least 300-350 words. Provide as much of the defined word....
Purchase this Solution
Solution Summary
The expert writes a word document about Encapsulation.
Solution Preview
Encapsulation
Definition: In object oriented programming encapsulation is an attribute of object design. It means that all of the object's data is contained and hidden in the object and access to it restricted to members of that class.
Programming languages aren't quite so strict and allow differing levels of access to the object's data. The first three levels of access shown below are in both C++ and C#, with the last two in C#.
• Public : All Objects can access it.
• Protected : Access is limited to members of the same class or descendants.
• Private : Access is limited to members of the same class.
• Internal : Access is limited to the current assembly.
• Protected Internal : Access is limited to the current assembly or types derived from the containing class.
Examples: For the best encapsulation, object data should almost always be restricted to private or protected.
Encapsulation: Storing data and functions in a single unit (class) is encapsulation. Data cannot be accessible to the outside world and only those functions which are stored in the class can access it.
Encapsulation is another element of OOPS. I have felt that Encapsulation is very close to abstraction. A different perspective of Abstraction....? Both are linked together, I assume. Abstraction is something that is existent because of Encapsulation. Abstraction is a principle or quality while Encapsulation is a technique. Encapsulation is possible because Objects do have a quality called Abstraction.
I remember someone told me that Abstraction is implemented through Encapsulation.
There is another definition-"Wrapping up of data and function together in a same entity called class". I don't like this one! I have heard this many times interviewers uttering. Its a too narrowed down, Programming specific definition. Object Orientation and thus Encapsulation is not only a programming language specific discipline. It has much broader aspects that it is there in the universe. When these qualities are disappeared (or taken away by God!) ...
Purchase this Solution
Free BrainMass Quizzes
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Javscript Basics
Quiz on basics of javascript programming language.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.