A First Program
John Pardoe, Melv King · 1997
Let us examine a simple program that displays a message on the monitor screen. We need an object class that defines the contents of the message and at least two functions. We need a function to give an initial value to the message and a function to display the contents of the message. With a little thought we could probably specify other functions such as determining the position on the screen or defining the colour of the background and foreground for the message. However, we will keep it simple and produce a model of the problem in the form of an object class with just two functions, as shown in the object schema given in figure 3.1.