= Solution
A <sequence diagram> shows participants as lifelines and the order of messages between them, usually with time progressing downward. It can show a client asking a sports wrapper for its price, followed by nested calls through the other decorators to the basic component, then replies carrying the accumulated cost.
A <state diagram> shows the possible states of a system and event-triggered transitions, with optional guards and actions. For an account, it might distinguish active, suspended and closed states and the events allowing a change.
Both are behavioral <UML> views, but \b[a sequence diagram emphasizes ordered interactions between participants; a state diagram emphasizes states and permitted transitions]. A lifecycle state diagram can admit many different message traces.
Back to article page