<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
information	B-Application
hiding	I-Application
is	O
the	O
principle	O
of	O
segregation	O
of	O
the	O
design	O
decisions	O
in	O
a	O
computer	B-Application
program	I-Application
that	O
are	O
most	O
likely	O
to	O
change	O
,	O
thus	O
protecting	O
other	O
parts	O
of	O
the	O
program	O
from	O
extensive	O
modification	O
if	O
the	O
design	O
decision	O
is	O
changed	O
.	O
</s>
<s>
The	O
protection	O
involves	O
providing	O
a	O
stable	O
interface	B-Application
which	O
protects	O
the	O
remainder	O
of	O
the	O
program	O
from	O
the	O
implementation	O
(	O
whose	O
details	O
are	O
likely	O
to	O
change	O
)	O
.	O
</s>
<s>
Written	O
in	O
another	O
way	O
,	O
information	B-Application
hiding	I-Application
is	O
the	O
ability	O
to	O
prevent	O
certain	O
aspects	O
of	O
a	O
class	O
or	O
software	O
component	B-Architecture
from	O
being	O
accessible	O
to	O
its	O
clients	O
,	O
using	O
either	O
programming	O
language	O
features	O
(	O
like	O
private	O
variables	O
)	O
or	O
an	O
explicit	O
exporting	O
policy	O
.	O
</s>
<s>
The	O
term	O
encapsulation	B-Application
is	O
often	O
used	O
interchangeably	O
with	O
information	B-Application
hiding	I-Application
.	O
</s>
<s>
Not	O
all	O
agree	O
on	O
the	O
distinctions	O
between	O
the	O
two	O
,	O
though	O
;	O
one	O
may	O
think	O
of	O
information	B-Application
hiding	I-Application
as	O
being	O
the	O
principle	O
and	O
encapsulation	B-Application
being	O
the	O
technique	O
.	O
</s>
<s>
A	O
software	O
module	B-Architecture
hides	O
information	O
by	O
encapsulating	O
the	O
information	O
into	O
a	O
module	B-Architecture
or	O
other	O
construct	O
which	O
presents	O
an	O
interface	B-Application
.	O
</s>
<s>
A	O
common	O
use	O
of	O
information	B-Application
hiding	I-Application
is	O
to	O
hide	O
the	O
physical	O
storage	O
layout	O
for	O
data	O
so	O
that	O
if	O
it	O
is	O
changed	O
,	O
the	O
change	O
is	O
restricted	O
to	O
a	O
small	O
subset	O
of	O
the	O
total	O
program	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
a	O
three-dimensional	O
point	O
(	O
,	O
,	O
)	O
is	O
represented	O
in	O
a	O
program	O
with	O
three	O
floating-point	B-Algorithm
scalar	O
variables	O
and	O
later	O
,	O
the	O
representation	O
is	O
changed	O
to	O
a	O
single	O
array	B-Data_Structure
variable	O
of	O
size	O
three	O
,	O
a	O
module	B-Architecture
designed	O
with	O
information	B-Application
hiding	I-Application
in	O
mind	O
would	O
protect	O
the	O
remainder	O
of	O
the	O
program	O
from	O
such	O
a	O
change	O
.	O
</s>
<s>
In	O
object-oriented	B-Language
programming	I-Language
,	O
information	B-Application
hiding	I-Application
(	O
by	O
way	O
of	O
nesting	B-General_Concept
of	O
types	O
)	O
reduces	O
software	O
development	O
risk	O
by	O
shifting	O
the	O
code	O
's	O
dependency	B-Application
on	O
an	O
uncertain	O
implementation	O
(	O
design	O
decision	O
)	O
onto	O
a	O
well-defined	O
interface	B-Application
.	O
</s>
<s>
Clients	O
of	O
the	O
interface	B-Application
perform	O
operations	O
purely	O
through	O
the	O
interface	B-Application
,	O
so	O
,	O
if	O
the	O
implementation	O
changes	O
,	O
the	O
clients	O
do	O
not	O
have	O
to	O
change	O
.	O
</s>
<s>
In	O
his	O
book	O
on	O
object-oriented	B-Application
design	I-Application
,	O
Grady	O
Booch	O
defined	O
encapsulation	B-Application
as	O
"	O
the	O
process	O
of	O
compartmentalizing	O
the	O
elements	O
of	O
an	O
abstraction	O
that	O
constitute	O
its	O
structure	O
and	O
behavior	O
;	O
encapsulation	B-Application
serves	O
to	O
separate	O
the	O
contractual	O
interface	B-Application
of	O
an	O
abstraction	O
and	O
its	O
implementation.	O
"	O
</s>
<s>
The	O
purpose	O
is	O
to	O
achieve	O
the	O
potential	O
for	O
change	O
:	O
the	O
internal	O
mechanisms	O
of	O
the	O
component	B-Architecture
can	O
be	O
improved	O
without	O
impact	O
on	O
other	O
components	O
,	O
or	O
the	O
component	B-Architecture
can	O
be	O
replaced	O
with	O
a	O
different	O
one	O
that	O
supports	O
the	O
same	O
public	O
interface	B-Application
.	O
</s>
<s>
Encapsulation	B-Application
also	O
protects	O
the	O
integrity	O
of	O
the	O
component	B-Architecture
,	O
by	O
preventing	O
users	O
from	O
setting	O
the	O
internal	O
data	O
of	O
the	O
component	B-Architecture
into	O
an	O
invalid	O
or	O
inconsistent	O
state	O
.	O
</s>
<s>
Another	O
benefit	O
of	O
encapsulation	B-Application
is	O
that	O
it	O
reduces	O
system	O
complexity	O
and	O
thus	O
increases	O
robustness	O
,	O
by	O
limiting	O
the	O
interdependencies	O
between	O
software	B-Architecture
components	I-Architecture
.	O
</s>
<s>
In	O
this	O
sense	O
,	O
the	O
idea	O
of	O
encapsulation	B-Application
is	O
more	O
general	O
than	O
how	O
it	O
is	O
applied	O
in	O
object-oriented	B-Language
programming	I-Language
.	O
</s>
<s>
For	O
example	O
,	O
a	O
relational	O
database	O
is	O
encapsulated	O
in	O
the	O
sense	O
that	O
its	O
only	O
public	O
interface	B-Application
is	O
a	O
query	B-Language
language	I-Language
(	O
such	O
as	O
SQL	B-Language
)	O
,	O
which	O
hides	O
all	O
the	O
internal	O
machinery	O
and	O
data	O
structures	O
of	O
the	O
database	O
management	O
system	O
.	O
</s>
<s>
As	O
such	O
,	O
encapsulation	B-Application
is	O
a	O
core	O
principle	O
of	O
good	O
software	O
architecture	O
,	O
at	O
every	O
level	O
of	O
granularity	O
.	O
</s>
<s>
Encapsulating	O
software	O
behind	O
an	O
interface	B-Application
allows	O
the	O
construction	O
of	O
objects	O
that	O
mimic	O
the	O
behavior	O
and	O
interactions	O
of	O
objects	O
in	O
the	O
real	O
world	O
.	O
</s>
<s>
They	O
can	O
understand	O
what	O
the	O
alarm	O
clock	O
does	O
,	O
and	O
how	O
to	O
use	O
it	O
through	O
the	O
provided	O
interface	B-Application
(	O
buttons	O
and	O
screen	O
)	O
,	O
without	O
having	O
to	O
understand	O
every	O
part	O
inside	O
of	O
the	O
clock	O
.	O
</s>
<s>
Similarly	O
,	O
if	O
the	O
clock	O
were	O
replaced	O
by	O
a	O
different	O
model	O
,	O
the	O
layperson	O
could	O
continue	O
to	O
use	O
it	O
in	O
the	O
same	O
way	O
,	O
provided	O
that	O
the	O
interface	B-Application
works	O
the	O
same	O
.	O
</s>
<s>
In	O
the	O
more	O
concrete	O
setting	O
of	O
an	O
object-oriented	B-Language
programming	I-Language
language	I-Language
,	O
the	O
notion	O
is	O
used	O
to	O
mean	O
either	O
an	O
information	B-Application
hiding	I-Application
mechanism	O
,	O
a	O
bundling	O
mechanism	O
,	O
or	O
the	O
combination	O
of	O
the	O
two	O
.	O
</s>
<s>
(	O
See	O
Encapsulation	B-Application
(	O
object-oriented	B-Language
programming	I-Language
)	O
for	O
details	O
.	O
)	O
</s>
<s>
The	O
concept	O
of	O
information	B-Application
hiding	I-Application
was	O
first	O
described	O
by	O
David	O
Parnas	O
in	O
1972	O
.	O
</s>
<s>
Before	O
then	O
,	O
modularity	B-Architecture
was	O
discussed	O
by	O
Richard	O
Gauthier	O
and	O
Stephen	O
Pont	O
in	O
their	O
1970	O
book	O
Designing	O
Systems	O
Programs	O
although	O
modular	B-Architecture
programming	I-Architecture
itself	O
had	O
been	O
used	O
at	O
many	O
commercial	O
sites	O
for	O
many	O
years	O
previously	O
–	O
especially	O
in	O
I/O	B-General_Concept
sub-systems	O
and	O
software	B-Library
libraries	I-Library
–	O
without	O
acquiring	O
the	O
'	O
information	B-Application
hiding	I-Application
 '	O
tag	O
–	O
but	O
for	O
similar	O
reasons	O
,	O
as	O
well	O
as	O
the	O
more	O
obvious	O
code	O
reuse	O
reason	O
.	O
</s>
<s>
Information	B-Application
hiding	I-Application
serves	O
as	O
an	O
effective	O
criterion	O
for	O
dividing	O
any	O
piece	O
of	O
equipment	O
,	O
software	O
,	O
or	O
hardware	O
,	O
into	O
modules	B-Architecture
of	O
functionality	O
.	O
</s>
<s>
In	O
order	O
to	O
make	O
the	O
design	O
,	O
manufacturing	O
,	O
and	O
maintenance	O
of	O
a	O
car	O
reasonable	O
,	O
the	O
complex	O
piece	O
of	O
equipment	O
is	O
divided	O
into	O
modules	B-Architecture
with	O
particular	O
interfaces	B-Application
hiding	O
design	O
decisions	O
.	O
</s>
<s>
The	O
engineers	O
designing	O
the	O
two	O
different	O
car	O
engines	O
,	O
one	O
for	O
the	O
luxury	O
version	O
and	O
one	O
for	O
the	O
standard	O
version	O
,	O
provide	O
the	O
same	O
interface	B-Application
for	O
both	O
engines	O
.	O
</s>
<s>
The	O
radio	O
with	O
CD	O
player	O
is	O
a	O
module	B-Architecture
that	O
replaces	O
the	O
standard	O
radio	O
,	O
also	O
a	O
module	B-Architecture
,	O
in	O
the	O
luxury	O
model	O
.	O
</s>
<s>
Each	O
team	O
then	O
designs	O
their	O
component	B-Architecture
to	O
a	O
particular	O
standard	O
or	O
interface	B-Application
which	O
allows	O
the	O
team	O
flexibility	O
in	O
the	O
design	O
of	O
the	O
component	B-Architecture
while	O
at	O
the	O
same	O
time	O
ensuring	O
that	O
all	O
of	O
the	O
components	O
will	O
fit	O
together	O
.	O
</s>
<s>
Such	O
a	O
"	O
platform	O
"	O
also	O
provides	O
an	O
example	O
of	O
information	B-Application
hiding	I-Application
,	O
since	O
the	O
floorplan	O
can	O
be	O
built	O
without	O
knowing	O
whether	O
it	O
is	O
to	O
be	O
used	O
in	O
a	O
sedan	O
or	O
a	O
hatchback	O
.	O
</s>
<s>
As	O
can	O
be	O
seen	O
by	O
this	O
example	O
,	O
information	B-Application
hiding	I-Application
provides	O
flexibility	O
.	O
</s>
<s>
This	O
flexibility	O
allows	O
a	O
programmer	O
to	O
modify	O
the	O
functionality	O
of	O
a	O
computer	B-Application
program	I-Application
during	O
normal	O
evolution	O
as	O
the	O
computer	B-Application
program	I-Application
is	O
changed	O
to	O
better	O
fit	O
the	O
needs	O
of	O
users	O
.	O
</s>
<s>
When	O
a	O
computer	B-Application
program	I-Application
is	O
well	O
designed	O
,	O
decomposing	O
the	O
source	O
code	O
solution	O
into	O
modules	B-Architecture
using	O
the	O
principle	O
of	O
information	B-Application
hiding	I-Application
,	O
evolutionary	O
changes	O
are	O
much	O
easier	O
because	O
the	O
changes	O
typically	O
are	O
local	O
rather	O
than	O
global	O
changes	O
.	O
</s>
<s>
Cars	O
provide	O
another	O
example	O
of	O
this	O
in	O
how	O
they	O
interface	B-Application
with	O
drivers	O
.	O
</s>
<s>
They	O
present	O
a	O
standard	O
interface	B-Application
(	O
pedals	O
,	O
wheel	O
,	O
shifter	O
,	O
signals	O
,	O
gauges	O
,	O
etc	O
.	O
)	O
</s>
<s>
(	O
Granted	O
,	O
there	O
are	O
manual	O
and	O
automatic	O
transmissions	O
and	O
other	O
such	O
differences	O
,	O
but	O
on	O
the	O
whole	O
,	O
cars	O
maintain	O
a	O
unified	O
interface	B-Application
.	O
)	O
</s>
