Encapsulation - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Encapsulation.

Encapsulation - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Encapsulation.
This section contains 452 words
(approx. 2 pages at 300 words per page)
Buy the Encapsulation Encyclopedia Article

In computer programming, encapsulation is in its broadest sense the process of bringing together elements to produce a new entity. In this sense a function is itself a manifestation of encapsulation because it is a self-contained block of code that performs a set of actions and returns a value of a known type: a function "encapsulates" the combined functionality of the code within it to build new functionality. Similarly, user-defined data types like C structures, C++ and Java classes, and Perl "hashes" are examples of encapsulation because they encapsulate the data in them.

Indeed, object-oriented languages like C++ and Java profoundly depend upon encapsulation to create classes and objects as instances of those classes. Both of these languages contain keywords like "private" and "protected" that force the compiler to rigidly enforce the encapsulation of both data and functionality; encapsulating data in this way is called "data hiding."

Data...

(read more)

This section contains 452 words
(approx. 2 pages at 300 words per page)
Buy the Encapsulation Encyclopedia Article
Copyrights
Gale
Encapsulation from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.