previous |
start |
next
Example: Printing an Invoice (UML Diagrams)
- Use the collaboration column in the CRC cards
to get the dependency relationships.
- An invoice object must hold the address and the
items when it prints the invoice.
- An invoice object need not hold a product
object when adding a product.
- It's the item's responsibility to hold the
product.
- There is no inheritance in this
example.
- The relationships between the invoice classes
can be expressed in the following diagram.

previous |
start |
next