Class Modeling

A characteristic of OOA is that the various steps are not easy to carry out. It is usually difficult to do class modeling the first time. The following three steps may help:

Concise Problem Definition

Example: Buttons in elevators and on the floors are to be used to control the motion of n elevators in a building with m floors.

Informal Strategy

Example: Buttons in elevators and on the floors are to be used to control the motion of n elevators in a building with m floors. Buttons illuminate when pressed to request an elevator to stop at a specific floor. The illumination is cancelled when the request has been served. When an elevator has no request, it remains at the current floor with its door closed.

Formalize the Strategy

Example: Buttons in elevators and on the floors are to be used to control the motion of n elevators in a building with m floors. Buttons illuminate when pressed to request an elevator to stop at a specific floor. The illumination is cancelled when the request has been served. When an elevator has no request, it remains at the current floor with its door closed.

The nouns identified in Step 3 lead to classes and sub-classes.