0% found this document useful (0 votes)
16 views

UML Examples

This pdf is all about UML Dagrams along with lots of examples!

Uploaded by

Pratik Solanki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

UML Examples

This pdf is all about UML Dagrams along with lots of examples!

Uploaded by

Pratik Solanki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Atul Gupta

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

Participating actors Passenger


Description Once the passenger is inside the elevator, it allows to select the
floor and move the elevator to the desired floor.
Entry condition The passenger is inside the elevator and the elevator is
stationary
Flow of events 1. The passenger selects the destination floor button;
2.The system switches the floor button (internal button) light
on;
3. The system closes the elevator door (#include
open/close_door Use case);
4. The system moves the elevator according to the destination
floor direction (up/down); (#include move_elevator Use case)
5. The system stops the elevator at the destination floor;
6. The system opens the door at the destination floordoor
(#include open/close_door Use case);
7. The passenger moves outside the elevator;
8. The system switches the floor internal button off and door is
closed door (#include open/close_door Use case);
5
Exit condition The passenger is outside the elevator in the desired floor; the
ECS– Domain Objects
The elevator control system shall allow the 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’s light on. When the passenger calls the elevator or selects the
destination floor, the elevator control system opens/closes the elevator
door suitably. 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’s light off and closes the door.
6
Sequence Diagram for ‘select_floor’
use case

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.

• Develop a domain model that includes a suitable hierarchy to model


people in the organization.
9/17/2024 18
9/17/2024 19
9/17/2024 20
OS Process
Model

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
???

Actors and their role in the leave workflow (Applicant-Faculty)

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

Report problem Design change


or and
change request estimate impact

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

You might also like