Practice Problems: Unified Modeling Language (UML)

  1. UML Class Diagrams can be used to represent a hierarchy chart (e.g., Figure 0-10, 0-11). Of course, there is some flexibility as to the level of detail given. For example, in Figure 0-10 of the text, they did not fully expand the hierarchy of Invertebrates, or of Fish, or for that matter, of Dogs, but they gave the flavor of the hierarchy.

    For each of the following families of objects, draw such a UML Class Diagram, suggesting the flavor of such a hierarchy chart.

    1. Vehicles
    2. Performing Arts and Entertainment

  2. UML Sequence Diagrams show the interactions that take place between various objects over time, in particular noting the messages which allow for the exchange of information (e.g., Figure 0-5, 0-8).

    For the following scenarios, identify the relevant objects and give a Sequence Diagram outlining their interactions.

    1. Buying a Sandwich at Au Bon Pain (or your favorite sandwich place)
    2. Getting Money from an ATM Machine

Michael Goldwasser
Last modified: Thursday, 29 January 2004