home *** CD-ROM | disk | FTP | other *** search
- Here we can see the real benefit of using abstract base classes
- and inheritance. In this example, the client code in useStack()
- takes a Stack object as an argument and performs various
- manipulations on it. The client code does not have to know about
- the implementation used. You could define a new class that
- implements stacks as doubly-linked lists, for example, and
- useStack() could accept objects of this class without any
- modifications.
-