<s>
The	O
exchange	O
can	O
be	O
between	O
software	O
,	O
computer	B-Architecture
hardware	I-Architecture
,	O
peripheral	O
devices	O
,	O
humans	B-Application
,	O
and	O
combinations	O
of	O
these	O
.	O
</s>
<s>
Some	O
computer	B-Architecture
hardware	I-Architecture
devices	O
,	O
such	O
as	O
a	O
touchscreen	B-Device
,	O
can	O
both	O
send	O
and	O
receive	O
data	O
through	O
the	O
interface	O
,	O
while	O
others	O
such	O
as	O
a	O
mouse	O
or	O
microphone	O
may	O
only	O
provide	O
an	O
interface	O
to	O
send	O
data	O
to	O
a	O
given	O
system	O
.	O
</s>
<s>
Hardware	B-Architecture
interfaces	B-Application
exist	O
in	O
many	O
components	O
,	O
such	O
as	O
the	O
various	O
buses	B-General_Concept
,	O
storage	B-General_Concept
devices	I-General_Concept
,	O
other	O
I/O	B-General_Concept
devices	I-General_Concept
,	O
etc	O
.	O
</s>
<s>
A	O
hardware	B-Architecture
interface	O
is	O
described	O
by	O
the	O
mechanical	O
,	O
electrical	O
,	O
and	O
logical	O
signals	O
at	O
the	O
interface	O
and	O
the	O
protocol	O
for	O
sequencing	O
them	O
(	O
sometimes	O
called	O
signaling	O
)	O
.	O
</s>
<s>
A	O
standard	O
interface	O
,	O
such	O
as	O
SCSI	B-Architecture
,	O
decouples	O
the	O
design	O
and	O
introduction	O
of	O
computing	B-Architecture
hardware	I-Architecture
,	O
such	O
as	O
I/O	B-General_Concept
devices	I-General_Concept
,	O
from	O
the	O
design	O
and	O
introduction	O
of	O
other	O
components	O
of	O
a	O
computing	O
system	O
,	O
thereby	O
allowing	O
users	O
and	O
manufacturers	O
great	O
flexibility	O
in	O
the	O
implementation	O
of	O
computing	O
systems	O
.	O
</s>
<s>
Hardware	B-Architecture
interfaces	B-Application
can	O
be	O
parallel	O
with	O
several	O
electrical	O
connections	O
carrying	O
parts	O
of	O
the	O
data	O
simultaneously	O
or	O
serial	B-Protocol
where	O
data	O
are	O
sent	O
one	O
bit	O
at	O
a	O
time	O
.	O
</s>
<s>
For	O
example	O
,	O
an	O
operating	O
system	O
may	O
interface	O
with	O
pieces	O
of	O
hardware	B-Architecture
.	O
</s>
<s>
Applications	O
or	O
programs	O
running	O
on	O
the	O
operating	O
system	O
may	O
need	O
to	O
interact	O
via	O
data	O
streams	B-Architecture
,	O
filters	O
,	O
and	O
pipelines	O
.	O
</s>
<s>
In	O
object	B-Language
oriented	I-Language
programs	I-Language
,	O
objects	O
within	O
an	O
application	B-Application
may	O
need	O
to	O
interact	O
via	O
methods	B-Language
.	O
</s>
<s>
A	O
key	O
principle	O
of	O
design	O
is	O
to	O
prohibit	O
access	O
to	O
all	O
resources	O
by	O
default	O
,	O
allowing	O
access	O
only	O
through	O
well-defined	O
entry	O
points	O
,	O
i.e.	O
,	O
interfaces	B-Application
.	O
</s>
<s>
Software	O
interfaces	B-Application
provide	O
access	O
to	O
computer	O
resources	O
(	O
such	O
as	O
memory	O
,	O
CPU	O
,	O
storage	O
,	O
etc	O
.	O
)	O
</s>
<s>
of	O
the	O
underlying	O
computer	O
system	O
;	O
direct	O
access	O
(	O
i.e.	O
,	O
not	O
through	O
well-designed	O
interfaces	B-Application
)	O
to	O
such	O
resources	O
by	O
software	O
can	O
have	O
major	O
ramifications	O
—	O
sometimes	O
disastrous	O
ones	O
—	O
for	O
functionality	O
and	O
stability	O
.	O
</s>
<s>
Interfaces	B-Application
between	O
software	B-Architecture
components	I-Architecture
can	O
provide	O
constants	O
,	O
data	O
types	O
,	O
types	O
of	O
procedures	O
,	O
exception	B-General_Concept
specifications	O
,	O
and	O
method	B-Language
signatures	O
.	O
</s>
<s>
The	O
interface	O
of	O
a	O
software	O
module	B-Architecture
A	O
is	O
deliberately	O
defined	O
separately	O
from	O
the	O
implementation	O
of	O
that	O
module	B-Architecture
.	O
</s>
<s>
The	O
latter	O
contains	O
the	O
actual	O
code	O
of	O
the	O
procedures	O
and	O
methods	B-Language
described	O
in	O
the	O
interface	O
,	O
as	O
well	O
as	O
other	O
"	O
private	O
"	O
variables	O
,	O
procedures	O
,	O
etc	O
.	O
</s>
<s>
Another	O
software	O
module	B-Architecture
B	O
,	O
for	O
example	O
the	O
client	B-Protocol
to	O
A	O
,	O
that	O
interacts	O
with	O
A	O
is	O
forced	O
to	O
do	O
so	O
only	O
through	O
the	O
published	O
interface	O
.	O
</s>
<s>
(	O
See	O
also	O
Liskov	B-Application
substitution	I-Application
principle	I-Application
.	O
)	O
</s>
<s>
In	O
some	O
object-oriented	B-Language
languages	I-Language
,	O
especially	O
those	O
without	O
full	O
multiple	B-Application
inheritance	I-Application
,	O
the	O
term	O
interface	O
is	O
used	O
to	O
define	O
an	O
abstract	O
type	O
that	O
contains	O
no	O
data	O
but	O
defines	O
behaviours	O
as	O
method	B-Language
signatures	O
.	O
</s>
<s>
A	O
class	O
having	O
code	O
and	O
data	O
for	O
all	O
the	O
methods	B-Language
corresponding	O
to	O
that	O
interface	O
and	O
declaring	O
so	O
is	O
said	O
to	O
implement	O
that	O
interface	O
.	O
</s>
<s>
Furthermore	O
,	O
even	O
in	O
single-inheritance-languages	O
,	O
one	O
can	O
implement	O
multiple	O
interfaces	B-Application
,	O
and	O
hence	O
can	O
be	O
of	O
different	O
types	O
at	O
the	O
same	O
time	O
.	O
</s>
<s>
An	O
interface	O
is	O
thus	O
a	O
type	O
definition	O
;	O
anywhere	O
an	O
object	O
can	O
be	O
exchanged	O
(	O
for	O
example	O
,	O
in	O
a	O
function	O
or	O
method	B-Language
call	I-Language
)	O
the	O
type	O
of	O
the	O
object	O
to	O
be	O
exchanged	O
can	O
be	O
defined	O
in	O
terms	O
of	O
one	O
of	O
its	O
implemented	O
interfaces	B-Application
or	O
base-classes	O
rather	O
than	O
specifying	O
the	O
specific	O
class	O
.	O
</s>
<s>
Usually	O
a	O
method	B-Language
defined	O
in	O
an	O
interface	O
contains	O
no	O
code	O
and	O
thus	O
cannot	O
itself	O
be	O
called	O
;	O
it	O
must	O
be	O
implemented	O
by	O
non-abstract	O
code	O
to	O
be	O
run	O
when	O
it	O
is	O
invoked	O
.	O
</s>
<s>
An	O
interface	O
called	O
"	O
Stack	B-Application
"	O
might	O
define	O
two	O
methods	B-Language
:	O
push( )	O
and	O
pop( )	O
.	O
</s>
<s>
Though	O
interfaces	B-Application
can	O
contain	O
many	O
methods	B-Language
they	O
may	O
contain	O
only	O
one	O
or	O
even	O
none	O
at	O
all	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Java	B-Language
language	I-Language
defines	O
the	O
interface	O
that	O
has	O
the	O
single	O
method	B-Language
;	O
various	O
implementations	O
are	O
used	O
for	O
different	O
purposes	O
,	O
including	O
,	O
,	O
,	O
,	O
and	O
.	O
</s>
<s>
Marker	B-Language
interfaces	I-Language
like	O
contain	O
no	O
methods	B-Language
at	O
all	O
and	O
serve	O
to	O
provide	O
run-time	O
information	O
to	O
generic	O
processing	O
using	O
Reflection	B-Language
.	O
</s>
<s>
The	O
use	O
of	O
interfaces	B-Application
allows	O
for	O
a	O
programming	O
style	O
called	O
programming	O
to	O
the	O
interface	O
.	O
</s>
<s>
The	O
idea	O
behind	O
this	O
approach	O
is	O
to	O
base	O
programming	O
logic	O
on	O
the	O
interfaces	B-Application
of	O
the	O
objects	O
used	O
,	O
rather	O
than	O
on	O
internal	O
implementation	O
details	O
.	O
</s>
<s>
Pushing	O
this	O
idea	O
to	O
the	O
extreme	O
,	O
inversion	B-Language
of	I-Language
control	I-Language
leaves	O
the	O
context	O
to	O
inject	O
the	O
code	O
with	O
the	O
specific	O
implementations	O
of	O
the	O
interface	O
that	O
will	O
be	O
used	O
to	O
perform	O
the	O
work	O
.	O
</s>
<s>
A	O
user	B-Application
interface	I-Application
is	O
a	O
point	O
of	O
interaction	O
between	O
a	O
computer	O
and	O
humans	B-Application
;	O
it	O
includes	O
any	O
number	O
of	O
modalities	B-General_Concept
of	O
interaction	O
(	O
such	O
as	O
graphics	O
,	O
sound	O
,	O
position	O
,	O
movement	O
,	O
etc	O
.	O
)	O
</s>
