All components can be characterized by two aspects:
-
The behavior of a component is the set of actions a component
can perform. The complete set of behavior for a component is
sometimes called the protocol.
-
The state of a component represents all the information
(data values) held within a component.
Notice that it is common for behavior to change state. For example,
the edit behavior of a recipe may change the preparation instructions,
which is part of the state.