This idea is illustrated
in chapter 6 of Carrano,
where we see several
implementations of a
stack, all of which have
the same interface.
A client program that
uses one implementation
can be modified to use
a different implementation
simply by re-compiling.
For example, we could
use either of the following
commands interchangeably:
g++ driver.cpp stackA.cpp
g++ driver.cpp stackP.cpp
(This assumes that
header files are also
changed as needed.)