next up previous
Next: Example for the design Up: Unit 03 Previous: Design methodology for a

Design methodology for a class: clients of the class

Once a class is realized, we should also realize an example client of the class to verify in practice how the class has to be used. Note that, in order to do so, we do not have to know the bodies of the public methods of the class. Indeed, from the point of view of the clients, what matters is what the public methods of the class do, not how they do it.

This means that we could also anticipate the realization of the clients of the class before we have realized the bodies of the public methods (and hence also before we introduce auxiliary methods).

In practice, after step 3 we can realize the so-called skeleton of the class, i.e., the class itself, in which we have just the headers of the public methods, instead of their definitions, and without any private method.

The skeleton of the class is sufficient to realize the clients of the class.


next up previous
Next: Example for the design Up: Unit 03 Previous: Design methodology for a