What is Object-Oriented Programming?


slide: What is Object-Oriented Programming?

Objectives

This section first provides a brief characterization of object orientation, as encompassing objects and inheritance. Moreover, it stresses the major theme by focusing on program organization and modeling, instead of programming {\it per s\'{e}}. However, it is also meant to introduce the minor theme, stressing that object orientation involves technology as well. First, a survey is given of the cliches involved in object orientation, including the terminology and propaganda concerning features and benefits. Then it proceeds with the introduction of the major theme, including a treatment of encapsulation, abstract data types, the client/server model, responsibilities, contracts and behavioral refinement (which amounts to improving on a contract).

Points to emphasize


slide: Points to emphasize

Possible difficulties

The notion of a contract may at first seem somewhat abstract, especially after introducing the wealth of terminology involved in object orientation. Even more difficult to grasp, at first, is the notion of behavioral refinement, or improving on a contract. You will need real life examples to convince your audience. For computer science students, the notion of abstract data types should not be problematic. For any other audience, however, you will probably need to discuss aspects of data hiding and present an example, say a stack.

Hints

Direct questions to the class are in my experience the best way in which to establish the level of knowledge of the audience while simultaneously introducing the terminology. Sometimes, students already seem to have a predetermined opinion about OOP. In particular, many dislike the jubilant tone and hype about OOP. A discussion is a good way to inform yourself of their attitudes and circumvent the possible scepticisms of the audience. You may profit from an example, for instance in the area of hypermedia systems, to enliven the discussion of the various concepts.

Questions

  1. How would you characterize OOP and what is in your opinion, the motivation underlying the introduction of OOP?
  2. Characterize the most important features of OOP.

slide: Questions

Comment

It is my experience that to some extent students need to be coerced to take the more abstract view of objects as embodying contracts. If you don't believe in this yourself, you have probably selected the wrong book.