View or Observer Classes

View classes are classes that provide a graphical representation of a data value, but do not themselves manage the data items. View classes are a good way to isolate data values from graphical user interface issues, since the GUI issues will probably change much more frequently than the representation of the data.

Another useful reason for separating view from data is that a single data object might have many different representations, or views. For example, data from a chart might be viewed as either a bar graph or as a pie chart.

[audio] [real] Text to accompany slide13, in Chapter 3 of An Introduction to Object-Oriented Programming