Behavior
Behavior
- Behavior determines how an object interacts with other objects
- how it acts on other objects
- how it reacts to requests from other objects
- Requests are made by message-passing
- Responding to a request may change the object’s state
- The behavior of an object is completely defined by its actions or operations
- Behavior can cause a state change
- If my Car is in the state Operational, a Breakdown operation will cause its state to change to Stalled
- Withdrawing from an Account may change its state to Overdrawn