GCO4020/CSC428 - Advanced Object Oriented Techniques In C++
Week 4
Topic 8: Wrappers
Exercises
Synopsis
Suggest why it might be desirable to create a Stack class
wrapper, rather than just using an Array directly to implement a
stack.
There is a sample solution for Exercise 1.
Suggest a situation in which it would be clearly preferable, or even necessary,
to encapsulate an implementation¤ class¤, rather than inherit from it.
There is a sample solution for Exercise 2.
Explain why neither the inheriting nor the encapsulating version of
Stack contains (or needs to contain!) any error checking code.
There is a sample solution for Exercise 3.
This material is part of the GCO4020/CSC428 - Advanced Object Oriented Techniques In C++ course.
Copyright © Damian Conway, 1997. All rights reserved.
Last updated: Fri Feb 18 11:17:31 2000