The domain model used in this example, Person , is a very simple model. While the domain models of some applications are complex and fascinating, Person really doesn't do much besides holding data. Still, it is fairly typical of many database-oriented applications, where keeping track of related information is the entire goal. You will build many domain classes that are virtually identical, except for the names and number of instance variables. The source code is in Person.java .
Person confines itself to managing the data for an individual person.
It contains no code describing how to display it in a user interface. That's the job of a separate user interface object. Therefore we'll make Person a subclass of Observable so the user interface can see when the Person changes . It could easily have others, but this is intended to be a simple example. Because applications have a way of growing and changing over time, and object-oriented programming provides techniques for minimizing the effects of change.