16.1. Responsibilities and Methods

The UML defines a responsibility as “a contract or obligation of a classifier” [OMG01]. Responsibilities are related to the obligations of an object in terms of its behavior. Basically, these responsibilities are of the following two types:

  • knowing

  • doing

Doing responsibilities of an object include:

  • doing something itself, such as creating an object or doing a calculation

  • initiating action in other objects

  • controlling and coordinating activities in other objects

Knowing responsibilities of an object include:

  • knowing about private encapsulated data

  • knowing about related objects

  • knowing about things it can derive or calculate

Responsibilities are assigned to classes of objects during object design. For example, I may ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.