SlideShare a Scribd company logo
Difference between Abstraction, Encapsulation and Information Hiding:<br />Abstraction – in a nutshell is making visible what you want the external world to see and keeping the other details behind the wraps. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. It hides the complexity. It is a technique by which we decide what information to hide and what to expose.<br />Information hiding - is making inaccessible certain details which would not affect other parts of the system. Just hiding it so that it is not exposed.<br />Encapsulation - is like enclosing in a capsule. That is enclosing the related operations and data related to an object into that object.If encapsulation was “the same thing as information hiding,” then one might make the argument that “everything that was encapsulated was also hidden.” This is obviously not true. For example, even though information may be encapsulated within record structures and arrays, this information is usually not hidden and is available for use. Encapsulation is just getting a set of operations and data together which belong together and putting them in a capsule.<br />Abstraction, information hiding, and encapsulation are different but related. Abstraction is a technique that helps us identify which specific information should be visible, and which information should be hidden. Encapsulation is the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible. Encapsulation can be thought of as the implementation of the abstract class.<br />Abstraction: One point of confusion regarding abstraction is its use as both process and an entity. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. Abstraction, as an entity, denotes a model, a view, or some other focused representation for an actual item. <br />Information Hiding: Its interface or definition was chosen to reveal as little as possible about its inner workings.\"
 <br />Why confusing: Abstraction can be used as a technique for idenfying which information should be hidden. Confusion can occur when people fail to distinguish between the hiding information, and a technique(e.g., abstraction) that is used to help identify which information is to be hidden. <br />Encapsulation: It refers to building a capsule, in the case a conceptual barrier, around some collection of things. <br />As a process: Encapsulation means the act of enclosing one or more items within a container. <br />As an entity: Encapsulation refers to a package or an enclosure that holds(contains, encloses) one or more items. <br />If encapsulation was \"
the same thing as information hiding,\"
 then one might make the argument that \"
everything that was encapsulated was also hidden.\"
 This is not obviously not true. <br />CONCLUSION: Abstraction, information hiding, and encapsulation are very different, but highly-related, concepts. One could argue that abstraction is a technique that help us identify which specific information should be visible, and which information should be hidden. Encapsulation is then the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible<br />Relationship between Abstraction, Encapsulation and Information Hiding:<br />ABSTRACTION<br />\"
A view of a problem that extracts the essential information relevant to a particular purpose and ignores the remainder of the information.\"
 <br />\"
The essence of abstraction is to extract essential properties while omitting inessential details.\"
 <br />\"
Abstraction is a process whereby we identify the important aspects of a phenomenon and ignore its details.\"
 <br />\"
Abstraction is generally defined as 'the process of formulating generalised concepts by extracting common qualities from specific examples.'\"
 <br />\"
Abstraction is the selective examination of certain aspects of a problem. The goal of abstraction is to isolate those aspects that are important for some purpose and suppress those aspects that are unimportant.\"
 <br />\"
The meaning [of abstraction] given by the Oxford English Dictionary (OED) closest to the meaning intended here is 'The act of separating in thought'. A better definition might be 'Representing the essential features of something without including background or inessential detail.'\"
 <br />\"
[A] simplified description, or specification, of a system that emphasizes some of the system's details or properties while suppressing others. A good abstraction is one that emphasizes details that are significant to the reader or user and suppress details that are, at least for the moment, immaterial or diversionary.\"
 <br />\"
An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of object and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer.\"
 <br />One point of confusion regarding abstraction is its use as both a process and an entity. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. Abstraction, as an entity, denotes a model, a view, or some other focused representation for an actual item. Abstraction is most often used as a complexity mastering technique. For example, we often hear people say such things as: \"
just give me the highlights\"
 or \"
just the facts, please.\"
 What these people are asking for are abstractions. <br />We can have varying degrees of abstraction, although these \"
degrees\"
 are more commonly referred to as \"
levels.\"
 As we move to higher levels of abstraction, we focus on the larger and more important pieces of information (using our chosen selection criteria). Another common observation is that as we move to higher levels of abstraction, we tend to concern ourselves with progressively smaller volumes of information, and fewer overall items. As we move to lower levels of abstraction, we reveal more detail, typically encounter more individual items, and increase the volume of information with which we must deal.  <br />Usually, abstraction is not defined in terms of information hiding, e.g., note the use of words such as \"
ignore\"
 and \"
extracting.\"
 However, we should also note the use of the words \"
suppress\"
 and \"
suppressing\"
 in some of the above examples. In short, you might say that abstraction dictates that some information is more important than other information, but (correctly) does not specify a specific mechanism for handling the unimportant information. <br />INFORMATION HIDING<br />\"
The second decomposition was made using 'information hiding' ... as a criterion. The modules no longer correspond to steps in the processing. ... Every module in the second decomposition is characterized by its knowledge of a design decision which it hides from all others. Its interface or definition was chosen to reveal as little as possible about its inner workings.\"
 <br />\"
... the purpose of hiding is to make inaccessible certain details that should not affect other parts of a system.\"
 <br />\"
... [I]nformation hiding: a module is characterized by the information it hides from other modules, which are called its clients. The hidden information remains a secret to the client modules.\"
 <br />\"
[Information hiding is] the principle that users of a software component (such as a class) need to know only the essential details of how to initialize and access the component, and do not need to know the details of the implementation.\"
 <br />\"
The technique of encapsulating software design decisions in modules in such a way that the module's interfaces reveal little as possible about the module's inner workings; thus each module is a 'black box' to the other modules in the system.\"
 <br />\"
The process of hiding all the details of an object that do not contribute to its essential characteristics; typically, the structure of an object is hidden, as well as the implementation of its methods. The terms information hiding and encapsulation are usually interchangeable.\"
 <br />\"
The principle of information hiding is central. It says that modules are used via their specifications, not their implementations. All information about a module, whether concerning data or function, is encapsulated with it and, unless specifically declared public, hidden from other modules.\"
 <br />We can now identify some of the sources of confusion about the differences between information hiding and abstraction, i.e.: <br />- Abstraction can be (and often is) used as a technique for identifying which information should be hidden. For example, in functional abstraction we might say that it is important to be able to add items to a list, but the details of how that is accomplished are not of interest and should be hidden. Using data abstraction, we would say that a list is a place where we can store information, but how the list is actually implemented (e.g., as an array or as a series of linked locations) is unimportant and should be hidden. <br />Confusion can occur when people fail to distinguish between the hiding of information, and a technique (e.g., abstraction) that is used to help identify which information is to be hidden. <br />- Some of the definitions for abstraction can also be sources of confusion. For example, words like \"
ignore,\"
 \"
omit,\"
 \"
extract,\"
 and \"
without including\"
 are rather passive, and would not necessarily imply the deliberate hiding of any information, e.g., \"
the information is there, and accessible, but we just ignore it.\"
 However, words like \"
suppress\"
 and \"
suppressing\"
 present a somewhat different image -- quite possibly the active and deliberate hiding of information. <br />Now, let's look at the other definitions for information hiding: <br />ENCAPSULATION<br />\"
1. to enclose in or as if in a capsule\"
 <br />\"
The concept of encapsulation as used in an object-oriented context is not essentially different from its dictionary definition. It still refers to building a capsule, in the case a conceptual barrier, around some collection of things.\"
 <br />\"
It is a simple, yet reasonable effective, system-building tool. It allows suppliers to present cleanly specified interfaces around the services they provide. A consumer has full visibility to the procedures offered by an object, and no visibility to its data. From a consumer's point of view, and object is a seamless capsule that offers a number of services, with no visibility as to how these services are implemented ... The technical term for this is encapsulation.\"
 <br />\"
Encapsulation or equivalently information hiding refers to the practice of including within an object everything it needs, and furthermore doing this in such a way that no other object need ever be aware of this internal structure.\"
 <br />\"
We say that the changeable, hidden information becomes the secret of the module; also, according to a widely used jargon, we say that such information is encapsulated within the implementation.\"
 <br />\"
Data hiding is sometimes called encapsulation because the data and its code are put together in a package or 'capsule.'\"
 <br />\"
Encapsulation is used as a generic term for techniques which realize data abstraction. Encapsulation therefore implies the provision of mechanisms to support both modularity and information hiding. There is therefore a one to one correspondence in this case between the technique of encapsulation and the principle of data abstraction.\"
 <br />\"
Encapsulation (also information hiding) consists of separating the external aspects of an object which are accessible to other objects, from the internal implementation details of the object, which are hidden from other objects.\"
 <br />\"
[E]ncapsulation -- also known as information hiding -- prevents clients from seeing its inside view, were the behavior of the abstraction is implemented.\"
 <br />Like abstraction, the word \"
encapsulation\"
 can be used to describe either a process or an entity. As a process, encapsulation means the act of enclosing one or more items within a (physical or logical) container. Encapsulation, as an entity, refers to a package or an enclosure that holds (contains, encloses) one or more items. It is extremely important to note that nothing is said about \"
the walls of the enclosure.\"
 Specifically, they may be \"
transparent,\"
 \"
translucent,\"
 or even \"
opaque.\"
 <br />If encapsulation was \"
the same thing as information hiding,\"
 then one might make the argument that \"
everything that was encapsulated was also hidden.\"
 This is obviously not true. For example, even though information may be encapsulated within record structures and arrays, this information is usually not hidden (unless hidden via some other mechanism). <br />Another example of encapsulated, but not hidden, information is the (highly undesirable) \"
block of global information\"
 technique reminiscent of FORTRAN's common blocks. Unfortunately, it is quite easy in some object-oriented languages to create blocks of global data in the form of classes. Specifically, it is possible to create classes with nothing but constants and variables in their public interfaces, i.e., there are no operations in the interface. (For reasons why this is undesirable, see discussions of \"
module coupling,\"
 e.g., [Myers, 1978] and [Yourdon and Constantine, 1979].) <br />It is indeed true that encapsulation mechanisms such as classes allow some information to be hidden. However, these same encapsulation mechanisms also allow some information to be visible. Some even allow varying degrees of visibility, e.g., C++'s public, protected, and private members. <br />Even arguing that encapsulation is necessary for information hiding is not as simple as one might suspect. Of course, one could very loosely define encapsulation such that any hidden information is (logically or physically) encapsulated in something. <br />Examining the cited definitions for encapsulation above, we make the following observations: <br />encapsulation. <br />- Although not as clean as it could be, the definition supplied by [Blair et al, 1991] presents an accurate view of the relationship among abstraction, information hiding, and encapsulation. <br />CONCLUSIONS<br />Abstraction, information hiding, and encapsulation are very different, but highly-related, concepts. One could argue that abstraction is a technique that helps us identify which specific information should be visible, and which information should be hidden. Encapsulation is then the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible. <br />It is not hard to see how abstraction, information hiding, and encapsulation became confused with one another. Further, one could argue that, regardless of their \"
dictionary definitions,\"
 these terms have evolved new meanings in the context of software engineering, e.g., in much the same way as \"
paradigm\"
 has. (See, e.g., [Kuhn, 1962].) However, a stronger argument can be made for keeping the concepts, and thus the terms, distinct. <br /> <br />
Assignment
Assignment
Assignment
Assignment
Assignment

More Related Content

PDF
NEW ALGORITHM FOR SENSITIVE RULE HIDING USING DATA DISTORTION TECHNIQUE
PPT
эффекты
PPTX
Marketing your Business with Social Media 12.9.11
PPT
Asem Catalunya
XLSX
วัสดุ
PPTX
Online shopping India
PPT
Механизмы адаптации организма человека к длительным физическим нагрузкам аэро...
PPT
NEW ALGORITHM FOR SENSITIVE RULE HIDING USING DATA DISTORTION TECHNIQUE
эффекты
Marketing your Business with Social Media 12.9.11
Asem Catalunya
วัสดุ
Online shopping India
Механизмы адаптации организма человека к длительным физическим нагрузкам аэро...

Viewers also liked (14)

PDF
Cd Anderson Portfolio West Rand District Profile
PPTX
Will and going to
PDF
50830181
DOCX
Hemofilia, resumen nucleo
PPT
Presentatie unilin, KGIGROEP 2011
PPTX
Breijer ventilatiedag kgigroep
PPT
Getting the-most-from-social-security
PPT
Counting Total Atoms in Compounds
PPT
Kuosmanen, Pakarinen ja Järvi: Vetovoimaa vanhempainiltoihin - mutta miten? O...
PDF
Our GBU bioepistemological educational project (BEEMP)
PDF
PS - the delivery of public speaking
PPTX
Vietnam
PDF
Capitulo 6
PDF
affTA04 - BAB IV
Cd Anderson Portfolio West Rand District Profile
Will and going to
50830181
Hemofilia, resumen nucleo
Presentatie unilin, KGIGROEP 2011
Breijer ventilatiedag kgigroep
Getting the-most-from-social-security
Counting Total Atoms in Compounds
Kuosmanen, Pakarinen ja Järvi: Vetovoimaa vanhempainiltoihin - mutta miten? O...
Our GBU bioepistemological educational project (BEEMP)
PS - the delivery of public speaking
Vietnam
Capitulo 6
affTA04 - BAB IV
Ad

Similar to Assignment (20)

PPTX
Abstraction and Encapsulation
PPTX
Abstraction file
PPTX
Abstraction file
PPTX
Abstraction file
PPTX
Abstraction file
PPTX
Abstraction file
PPTX
Abstraction file
PPTX
Abstraction file
PPTX
PPTX
Lecture 2
PPTX
PDF
CSCI 383 Lecture 3 and 4: Abstraction
PPTX
Abstraction and Encapsulation
PPTX
[OOP - Lec 08] Encapsulation (Information Hiding)
DOCX
Benefits of encapsulation
PPTX
2104008-and-210402jjjjjjjjjjjjjjjjjjjj5.pptx
PPT
Chapter 02 The Object Model_Software E.ppt
PPTX
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
PPTX
ABSTRACTION for data computing machines and
PPT
C# Encapsulation
Abstraction and Encapsulation
Abstraction file
Abstraction file
Abstraction file
Abstraction file
Abstraction file
Abstraction file
Abstraction file
Lecture 2
CSCI 383 Lecture 3 and 4: Abstraction
Abstraction and Encapsulation
[OOP - Lec 08] Encapsulation (Information Hiding)
Benefits of encapsulation
2104008-and-210402jjjjjjjjjjjjjjjjjjjj5.pptx
Chapter 02 The Object Model_Software E.ppt
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
ABSTRACTION for data computing machines and
C# Encapsulation
Ad

Recently uploaded (20)

PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PDF
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
PDF
Traveri Digital Marketing Seminar 2025 by Corey and Jessica Perlman
PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
PDF
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
PPTX
Probability Distribution, binomial distribution, poisson distribution
PPTX
5 Stages of group development guide.pptx
PDF
IFRS Notes in your pocket for study all the time
PDF
Nidhal Samdaie CV - International Business Consultant
PDF
WRN_Investor_Presentation_August 2025.pdf
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PDF
Roadmap Map-digital Banking feature MB,IB,AB
PDF
Types of control:Qualitative vs Quantitative
PDF
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
DOCX
Business Management - unit 1 and 2
PPTX
Lecture (1)-Introduction.pptx business communication
PPTX
Amazon (Business Studies) management studies
PDF
DOC-20250806-WA0002._20250806_112011_0000.pdf
PPTX
HR Introduction Slide (1).pptx on hr intro
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Reconciliation AND MEMORANDUM RECONCILATION
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
Traveri Digital Marketing Seminar 2025 by Corey and Jessica Perlman
New Microsoft PowerPoint Presentation - Copy.pptx
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
Probability Distribution, binomial distribution, poisson distribution
5 Stages of group development guide.pptx
IFRS Notes in your pocket for study all the time
Nidhal Samdaie CV - International Business Consultant
WRN_Investor_Presentation_August 2025.pdf
Ôn tập tiếng anh trong kinh doanh nâng cao
Roadmap Map-digital Banking feature MB,IB,AB
Types of control:Qualitative vs Quantitative
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
Business Management - unit 1 and 2
Lecture (1)-Introduction.pptx business communication
Amazon (Business Studies) management studies
DOC-20250806-WA0002._20250806_112011_0000.pdf
HR Introduction Slide (1).pptx on hr intro

Assignment

  • 1. Difference between Abstraction, Encapsulation and Information Hiding:<br />Abstraction – in a nutshell is making visible what you want the external world to see and keeping the other details behind the wraps. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. It hides the complexity. It is a technique by which we decide what information to hide and what to expose.<br />Information hiding - is making inaccessible certain details which would not affect other parts of the system. Just hiding it so that it is not exposed.<br />Encapsulation - is like enclosing in a capsule. That is enclosing the related operations and data related to an object into that object.If encapsulation was “the same thing as information hiding,” then one might make the argument that “everything that was encapsulated was also hidden.” This is obviously not true. For example, even though information may be encapsulated within record structures and arrays, this information is usually not hidden and is available for use. Encapsulation is just getting a set of operations and data together which belong together and putting them in a capsule.<br />Abstraction, information hiding, and encapsulation are different but related. Abstraction is a technique that helps us identify which specific information should be visible, and which information should be hidden. Encapsulation is the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible. Encapsulation can be thought of as the implementation of the abstract class.<br />Abstraction: One point of confusion regarding abstraction is its use as both process and an entity. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. Abstraction, as an entity, denotes a model, a view, or some other focused representation for an actual item. <br />Information Hiding: Its interface or definition was chosen to reveal as little as possible about its inner workings.\" <br />Why confusing: Abstraction can be used as a technique for idenfying which information should be hidden. Confusion can occur when people fail to distinguish between the hiding information, and a technique(e.g., abstraction) that is used to help identify which information is to be hidden. <br />Encapsulation: It refers to building a capsule, in the case a conceptual barrier, around some collection of things. <br />As a process: Encapsulation means the act of enclosing one or more items within a container. <br />As an entity: Encapsulation refers to a package or an enclosure that holds(contains, encloses) one or more items. <br />If encapsulation was \" the same thing as information hiding,\" then one might make the argument that \" everything that was encapsulated was also hidden.\" This is not obviously not true. <br />CONCLUSION: Abstraction, information hiding, and encapsulation are very different, but highly-related, concepts. One could argue that abstraction is a technique that help us identify which specific information should be visible, and which information should be hidden. Encapsulation is then the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible<br />Relationship between Abstraction, Encapsulation and Information Hiding:<br />ABSTRACTION<br />\" A view of a problem that extracts the essential information relevant to a particular purpose and ignores the remainder of the information.\" <br />\" The essence of abstraction is to extract essential properties while omitting inessential details.\" <br />\" Abstraction is a process whereby we identify the important aspects of a phenomenon and ignore its details.\" <br />\" Abstraction is generally defined as 'the process of formulating generalised concepts by extracting common qualities from specific examples.'\" <br />\" Abstraction is the selective examination of certain aspects of a problem. The goal of abstraction is to isolate those aspects that are important for some purpose and suppress those aspects that are unimportant.\" <br />\" The meaning [of abstraction] given by the Oxford English Dictionary (OED) closest to the meaning intended here is 'The act of separating in thought'. A better definition might be 'Representing the essential features of something without including background or inessential detail.'\" <br />\" [A] simplified description, or specification, of a system that emphasizes some of the system's details or properties while suppressing others. A good abstraction is one that emphasizes details that are significant to the reader or user and suppress details that are, at least for the moment, immaterial or diversionary.\" <br />\" An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of object and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer.\" <br />One point of confusion regarding abstraction is its use as both a process and an entity. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. Abstraction, as an entity, denotes a model, a view, or some other focused representation for an actual item. Abstraction is most often used as a complexity mastering technique. For example, we often hear people say such things as: \" just give me the highlights\" or \" just the facts, please.\" What these people are asking for are abstractions. <br />We can have varying degrees of abstraction, although these \" degrees\" are more commonly referred to as \" levels.\" As we move to higher levels of abstraction, we focus on the larger and more important pieces of information (using our chosen selection criteria). Another common observation is that as we move to higher levels of abstraction, we tend to concern ourselves with progressively smaller volumes of information, and fewer overall items. As we move to lower levels of abstraction, we reveal more detail, typically encounter more individual items, and increase the volume of information with which we must deal. <br />Usually, abstraction is not defined in terms of information hiding, e.g., note the use of words such as \" ignore\" and \" extracting.\" However, we should also note the use of the words \" suppress\" and \" suppressing\" in some of the above examples. In short, you might say that abstraction dictates that some information is more important than other information, but (correctly) does not specify a specific mechanism for handling the unimportant information. <br />INFORMATION HIDING<br />\" The second decomposition was made using 'information hiding' ... as a criterion. The modules no longer correspond to steps in the processing. ... Every module in the second decomposition is characterized by its knowledge of a design decision which it hides from all others. Its interface or definition was chosen to reveal as little as possible about its inner workings.\" <br />\" ... the purpose of hiding is to make inaccessible certain details that should not affect other parts of a system.\" <br />\" ... [I]nformation hiding: a module is characterized by the information it hides from other modules, which are called its clients. The hidden information remains a secret to the client modules.\" <br />\" [Information hiding is] the principle that users of a software component (such as a class) need to know only the essential details of how to initialize and access the component, and do not need to know the details of the implementation.\" <br />\" The technique of encapsulating software design decisions in modules in such a way that the module's interfaces reveal little as possible about the module's inner workings; thus each module is a 'black box' to the other modules in the system.\" <br />\" The process of hiding all the details of an object that do not contribute to its essential characteristics; typically, the structure of an object is hidden, as well as the implementation of its methods. The terms information hiding and encapsulation are usually interchangeable.\" <br />\" The principle of information hiding is central. It says that modules are used via their specifications, not their implementations. All information about a module, whether concerning data or function, is encapsulated with it and, unless specifically declared public, hidden from other modules.\" <br />We can now identify some of the sources of confusion about the differences between information hiding and abstraction, i.e.: <br />- Abstraction can be (and often is) used as a technique for identifying which information should be hidden. For example, in functional abstraction we might say that it is important to be able to add items to a list, but the details of how that is accomplished are not of interest and should be hidden. Using data abstraction, we would say that a list is a place where we can store information, but how the list is actually implemented (e.g., as an array or as a series of linked locations) is unimportant and should be hidden. <br />Confusion can occur when people fail to distinguish between the hiding of information, and a technique (e.g., abstraction) that is used to help identify which information is to be hidden. <br />- Some of the definitions for abstraction can also be sources of confusion. For example, words like \" ignore,\" \" omit,\" \" extract,\" and \" without including\" are rather passive, and would not necessarily imply the deliberate hiding of any information, e.g., \" the information is there, and accessible, but we just ignore it.\" However, words like \" suppress\" and \" suppressing\" present a somewhat different image -- quite possibly the active and deliberate hiding of information. <br />Now, let's look at the other definitions for information hiding: <br />ENCAPSULATION<br />\" 1. to enclose in or as if in a capsule\" <br />\" The concept of encapsulation as used in an object-oriented context is not essentially different from its dictionary definition. It still refers to building a capsule, in the case a conceptual barrier, around some collection of things.\" <br />\" It is a simple, yet reasonable effective, system-building tool. It allows suppliers to present cleanly specified interfaces around the services they provide. A consumer has full visibility to the procedures offered by an object, and no visibility to its data. From a consumer's point of view, and object is a seamless capsule that offers a number of services, with no visibility as to how these services are implemented ... The technical term for this is encapsulation.\" <br />\" Encapsulation or equivalently information hiding refers to the practice of including within an object everything it needs, and furthermore doing this in such a way that no other object need ever be aware of this internal structure.\" <br />\" We say that the changeable, hidden information becomes the secret of the module; also, according to a widely used jargon, we say that such information is encapsulated within the implementation.\" <br />\" Data hiding is sometimes called encapsulation because the data and its code are put together in a package or 'capsule.'\" <br />\" Encapsulation is used as a generic term for techniques which realize data abstraction. Encapsulation therefore implies the provision of mechanisms to support both modularity and information hiding. There is therefore a one to one correspondence in this case between the technique of encapsulation and the principle of data abstraction.\" <br />\" Encapsulation (also information hiding) consists of separating the external aspects of an object which are accessible to other objects, from the internal implementation details of the object, which are hidden from other objects.\" <br />\" [E]ncapsulation -- also known as information hiding -- prevents clients from seeing its inside view, were the behavior of the abstraction is implemented.\" <br />Like abstraction, the word \" encapsulation\" can be used to describe either a process or an entity. As a process, encapsulation means the act of enclosing one or more items within a (physical or logical) container. Encapsulation, as an entity, refers to a package or an enclosure that holds (contains, encloses) one or more items. It is extremely important to note that nothing is said about \" the walls of the enclosure.\" Specifically, they may be \" transparent,\" \" translucent,\" or even \" opaque.\" <br />If encapsulation was \" the same thing as information hiding,\" then one might make the argument that \" everything that was encapsulated was also hidden.\" This is obviously not true. For example, even though information may be encapsulated within record structures and arrays, this information is usually not hidden (unless hidden via some other mechanism). <br />Another example of encapsulated, but not hidden, information is the (highly undesirable) \" block of global information\" technique reminiscent of FORTRAN's common blocks. Unfortunately, it is quite easy in some object-oriented languages to create blocks of global data in the form of classes. Specifically, it is possible to create classes with nothing but constants and variables in their public interfaces, i.e., there are no operations in the interface. (For reasons why this is undesirable, see discussions of \" module coupling,\" e.g., [Myers, 1978] and [Yourdon and Constantine, 1979].) <br />It is indeed true that encapsulation mechanisms such as classes allow some information to be hidden. However, these same encapsulation mechanisms also allow some information to be visible. Some even allow varying degrees of visibility, e.g., C++'s public, protected, and private members. <br />Even arguing that encapsulation is necessary for information hiding is not as simple as one might suspect. Of course, one could very loosely define encapsulation such that any hidden information is (logically or physically) encapsulated in something. <br />Examining the cited definitions for encapsulation above, we make the following observations: <br />encapsulation. <br />- Although not as clean as it could be, the definition supplied by [Blair et al, 1991] presents an accurate view of the relationship among abstraction, information hiding, and encapsulation. <br />CONCLUSIONS<br />Abstraction, information hiding, and encapsulation are very different, but highly-related, concepts. One could argue that abstraction is a technique that helps us identify which specific information should be visible, and which information should be hidden. Encapsulation is then the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible. <br />It is not hard to see how abstraction, information hiding, and encapsulation became confused with one another. Further, one could argue that, regardless of their \" dictionary definitions,\" these terms have evolved new meanings in the context of software engineering, e.g., in much the same way as \" paradigm\" has. (See, e.g., [Kuhn, 1962].) However, a stronger argument can be made for keeping the concepts, and thus the terms, distinct. <br /> <br />