|
||
Lesson 10
Objective
|
The ADT's interface
Understand what belongs in an ADT's interface. |
|
| Black Box
The struct ch_stack has a private part that contains its data description, and a public part that contains member functions to implement
ch_stack operations.
It is useful to think of the private part as restricted to the implementor's use, and the public part as a specification that clients may use. These public members are also called the type's interface. The implementor could change the private part without affecting the correctness of a client's use of the ch_stack type. Here is an example of how we might test ch_stack's operations. |
||
|
|
||