Introduction


introduction teaching contracts patterns events examples foundations conclusions references
Teaching OO is a challenge. At first sight the concepts involved, such as encapsulation and inheritance, seem simple and natural. Yet, for many students, many of the basic concepts underlying object oriented programming and design are counter-intuitive and difficult to grasp. Moreover, mastery of OO requires familiarity with idiomatic solutions to programming problems and insight into patterns of design. In other words, on closer inspection OO provides a vast reservoir of intellectual problems for which only partial solutions can be provided.

This paper discusses what I consider fundamental concepts in teaching object oriented programming and design: contracts, patterns and events. In particular, we concentrate on the issues encountered in teaching these concept. The discussion is based on my experience in teaching OO at the Vrije Universiteit, using  [Poosd].

The structure of this paper is as follows. First, an overview of the approach taken in teaching OO is presented. Then the notions of contracts, patterns and events are treated in more detail. For each notion some background will be given, its relevance will be argued, and the problems encountered in teaching it will be discussed. For each concept, moreover, a metaphor will be presented that is meant to guide the intuition. We will also look at some examples demonstrating a possible realization and application of the concepts discussed and, finally, we will briefly look at the theoretical foundations for these concepts.


introduction teaching contracts patterns events examples foundations conclusions references