UML Examples
UML Examples
UML – Examples,
Semantics, and
Explanations
9/17/2024 1
Important UML Diagrams
Elevator control system (ECS)
Functional requirements:
The elevator control system shall allow a passenger to call the
elevator and to select the destination floor. When the passenger
pushes the external button (to call the elevator), or the internal
button (to select the destination floor), the elevator control
system switches the button light on. When the passenger calls the
elevator or selects the destination floor, the elevator control
system opens/closes the elevator door. When the passenger calls
the elevator or selects the destination floor, the elevator control
system moves/stops the elevator to/at the passenger call floor or
to/at the passenger destination floor. When the passenger leaves
the elevator, the elevator control system switches the button light
off and closes the door.
9/17/2024 3
ECS – Use cases
9/17/2024 4
Use case name select_floor
7
The Class Diagram (Domain Model)
9/17/2024 8
Use Case Diagram – Complaint Management System
9/17/2024 9
More Class Diagram Examples (1)
9/17/2024 10
More Class Diagram
Examples (2)
9/17/2024 11
More Class Diagram Examples (3)
Aggregation-Composition3.png
More Class Diagram Examples (4)
More Class Diagram Examples (4)
More Class Diagram Examples (5)
Ex: Project Project
*
Activity
is produced by * consumes
WorkProduct * Task * Resources
System Participant
Model Time
Document Equipment
More Class Diagram Examples (6)
UML Meta-modeling:
Expressions
An Exercise …
• Consider an organization employing people in various capacities. Entry
level positions are designated as developers, and after various kind of
trainings which allows them to acquire specific set of skills, they are
assigned to some projects in which they can work as testers, designers,
programmers, customer representatives, requirement analysts, and
customer care executives. A developer can work in more than one project
at the same time, and may be in different capacities. The developers work
in teams which are headed by a team leader. A project is typically
undertaken by different teams and managed by a project manager. A vice
president is responsible to undertake many projects and report to the CEO
of the organization.
9/17/2024 21
https://help.anylogic.com/index.jsp?topic=%2Fcom.anylogic.help%2Fhtml%2Fstatecharts%2FStatecharts_API.html
9/17/2024 22
ACTIVITY DIAGRAM EXAMPLES
9/17/2024 23
Example:
The Leave
Module
UCD:
The Leave Module
9/25/2024 25
???
9/25/2024 30
Participating Actors and Use cases for the
leave application workflow
So, the Actor-Oriented-
Activity Diagram for the
leave module …
(Applicant – Faculty)
So, the Actor-Oriented-
Activity Diagram for the
leave module …
(Applicant – Faculty)
9/25/2024 33
The AO-AD of the Leave Module
• Note that
– The AO-AD contains the actions taken by the
different actors in sequence in the workflow
– It does not contains the actions taken by the
systems.
– The workflow typically spans across multiple use
cases (belonging to different actors)
9/25/2024 34
Another Example:
GEM Procurement
Process
Three Actors:
Indenter, GEM Buyer/Consignee,
and PAO
9/17/2024 35
Client Developer
Review proposed
change
[change approved]
Update Archive
requirements request
Design Update
test design
Update code
Activity D:
example of
(if applicable)
Execute all
relevant tests
process
Review actual
modeling
change
Component
Diagram
9/17/2024 37
Why UML?
• A medium of communication and information
sharing needed
– To allow developers to communicate with high
levels of precision. A lot of decisions have to be
made and have to be communicated
– Software development – A long drawn process
– Economics of software development
9/17/2024 38
UML Criticisms
• Large and Complex
• Some instances of Inconsistent use
• Semantically inadequate
– OCL to help
• Maintenance and synchronization issues
• Lack of standardization
– UML version 1.4.2 document is now an ISO/IEC
19501
UML References
• M Fowler, UML Distilled, third edition, Addison Wesley
• Grady Booch, James Rumbaugh, Ivar Jacobson, “The Unified
Modeling Language User Guide”, Addison Wesley, 1999.
• Bernd Bruegge, Allen Dutoit: “Object-Oriented Software
Engineering: Using UML, Patterns, and Java”, Prentice Hall,
2003.
• http://www.uml.org/
• http://www-01.ibm.com/software/rational/uml/
• http://www.agilemodeling.com/essays/umlDiagrams.htm