Validating domain objects

A Payment is one of three kinds: Cash, Check, or Credit.The order contains Order Details (line items), each with its associated Item.Notice that a single use case can have multiple actors.

validating domain objects-70

In our example, there can be only one Customer for each Order, but a Customer can have any number of Orders. Every class diagram has classes, associations, and multiplicities.

Navigability and roles are optional items placed in a diagram to provide clarity.

The arrow also lets you know who "owns" the association's implementation; in this case, Order Detail has an Item.

Associations with no navigability arrows are bi-directional.

A use case diagram is a collection of actors, use cases, and their communications.