Title: Brief Overview of UML Diagrams with a Simple Example
1Brief Overview of UML Diagrams with a Simple
Example
ECE 417/617Elements of Software Engineering
Stan Birchfield Clemson University
2A Simple Problem
switch
1 W
5 V
light
31. Use Case Diagram
SimpleCircuit
FlipOn
FlipOff
ViewLight
User
Functionality from users point of view
42. Class Diagram
Switch
Resistor
Light
Battery 5V
Structure of system (objects, attributes,
associations, operations)
53. Interaction Diagram (a) Sequence Diagram
Resistor
Switch
Battery
Light
User
FlipOn()
HeatUp()
Drain()
Shine()
Messages between objects
63. Interaction Diagram (b) Collaboration Diagram
User
1. FlipOn()
1.1 HeatUp()
Resistor
Switch
1.2 Shine()
1.3 Drain()
Battery
Light
More compact, but harder to interpret
74. Statechart Diagram
flipSwitchOn
Light Off
Light On
flipSwitchOff
Transitions between states of one
object (Extension of Finite State Machine (FSM)
model)
84. Statechart Diagram (different objects)
flipSwitchOn
flipSwitchOn
Not Draining
Cold
Hot
Draining
flipSwitchOff
flipSwitchOff
(Resistor)
(Battery)
95. Activity Diagram
Flip Switch Off
Flip Switch On
Actions are states
10Summary
- We have looked at five diagrams
- Use case diagrams Functional Model-- models
functionality from users point of view - Class diagrams Object Model-- models
structure of system using objects - Interaction diagrams Dynamic Model(sequence
and collaboration)-- models messages passed
between objects - Statechart diagrams Dynamic Model-- models
transitions between states - Activity diagrams Dynamic Model-- models
flow control as transitions between activities - The actual UML spec has 12 diagrams, but these
five will be sufficient for us.