UML Class Diagram
This diagram describes the structure of a simple Restaurant System. UML shows is_a relationships with a triangle; and containers with diamond shape. Additionally, the role of the relationship may be specified as well as the cardinality (in the diagram above, the roles are accidentally on the wrong end of the lines --- for example, seats should be at the association end that terminates on Patrons --- see Fowler and Scott, UML Distilled, 2nd Edition, page 56 or Mellor and Balcer, Executable UML, page 214). The Restaurant System has any number of Food dishes, and one Kitchen, Dining Area, and any number of staff. All of these objects are associated to one Restaurant. (This model did not include a washroom.)
UML Sequence Diagram
This diagram describes the sequences of messages of the (simple) Restaurant System. This diagram represents a Patron ordering food, eating the food, drinking wine, then paying for the food. The dotted lines extending downwards indicate the timeline. The arrows represent messages (stimuli) from an actor or object to other objects. For example, the Patron sends message 'pay' to the Cashier.
- Actor
- Activity
- Interface
- Package
- Class
- Statechart,
- Sequence
- Event
- IS-A
- HAS
- USES
- DEPENDS-ON
- There is a cardinality notation which corresponds to Database Modelling cardinality , eg: 1:0..1, 1:*
- There are specialized classes for common uses, such as Role, Use Case
- The concept of a stereotype is built-in to the language
See also:
Open Source UML programs:
Article based on Unified Modeling Language at FOLDOC, used with permission.
Message board for UML at [1]
''A free