Professional Documents
Culture Documents
Uml PDF
Uml PDF
and
The Unified Modeling Language
UML
Collaboration Activity
Diagram Diagram
Object Diagram
Analysis
Sequence
Diagrams
Validate
Class
Diagram
Design
State Chart
Diagrams
Validate
Deployment
Process View
View
Performance System topology
Scalability Distribution
Throughput Delivery
Installation
Static Model
Class structure
Logical Model
Object structure
Module architecture
Physical Model
Process architecture
Buy Item
Log in
Cashier Customer
Refund a Purchase
«include»
Clock
Select an Option
User
«include»
Display Hightest
and Lowest
Buy Item
*
*
*
Customer
Refund a Purchase *
Perform Card
Transaction
Retail Institution
Customer Process Customer
Bills
«inherits»
Reconcile
«inherits»
Transaction
Corporate Custumer
Set Time/Date
Clock
Set Temperature
Units
User
Calibrate Sensor
Sensor
Display Highest
and Lowest
The past high/low values of each primary measurement is set to the value
and time of their first sample.
The temperature and Pressure trends are flat.
The input manager is in the Running state
«include»
Clock
Select an Option
User
«include»
Display Hightest
and Lowest
object name
and class joe : Person
* 0..1
control
consolewindow dialogbox
1..* *
university department
1 *
-employee -employer
J. Maletic Kent State University 54
Dependency
• Represents a using relationship
• If a change in specification in one class
effects another class (but not the other way
around) there is a dependency
windspeedSensor
windchill
tempatureSensor
Generalization
CalibratingSensor
• An is-a relationship
• Abstract class +currentValue()
+calibrate()
WindDirectionSensor
HistoricalSensor +currentDirection()
-highestValue
-lowestVale
+resetHighest()
+resetLowest()
TrendSensor
-trend HumiditySensor WindspeedSensor
-humidity -speed
+currentHumidity() +currentSpeed()
TemperatureSensor Barometer
-temp -pressure
+currentTemp() +currentPressure()
J. Maletic Kent State University 56
Which Relation is Right?
• Aggregation – aka is-part-of, is-made-of,
contains
• Use association when specific (persistent)
objects have multiple relationships (e.g.,
there is only one Bill Gates at MS)
• Use dependency when working with static
objects, or if there is only one instance
• Do not confuse part-of with is-a
J. Maletic Kent State University 57
Object Modeling
• Given the high-level requirements (use cases)
• Define the object model
– Identify objects
– Compile a data dictionary
– Identify association and aggregations
– Identify attributes of objects
– Generalize objects into classes
– Organized and abstract using inheritance
– Iterate and refine model
– Group classes into modules/components
J. Maletic Kent State University 58
Example: Weather Monitoring
Station
• This system shall provide automatic monitoring of various
weather conditions. Specifically, it must measure:
– wind speed and direction
– temperature
– barometric pressure
– humidity
• The system shall also proved the following derived
measurements:
– wind chill
– dew point temperature
– temperature trend
– barometric pressure trend
J. Maletic Kent State University 59
Weather Monitoring System
Requirements
• The system shall have the means of determining the
current time and date so that it can report the highest and
lowest values for any of the four primary measurements
during the previous 24 hour period.
• The system shall have a display that continuously indicates
all eight primary and derived measurements, as well as
current time and date.
• Through he use of a keypad the user may direct the system
to display the 24 hour low or high of any one primary
measurement, with the time of the reported value.
• The system shall allow the user to calibrate its sensors
against known values, and set the current time and date.
J. Maletic Kent State University 60
Weather Station
Use Diagrams
Turn System on/off
Set Time/Date
Clock
Set Temperature
Units
User
Calibrate Sensor
Sensor
Display Highest
and Lowest
Top Package::HumiditySensor
-humidity
1
+currentHumidity()
sampler 1
1
Top Package::WindDirectionSensor
displayManager 1
1
1
+currentDirection()
1
Top Package::WindspeedSensor
1 -speed
+currentSpeed()
1
Top Package::Barometer
-pressure
+currentPressure()
windChill
1
1 1
1 1
inputManager
sampler dewPoint
1
1
1
«interface»
1
keypad
windDirection
1
sensors
1 1
1 sensor
1
1
1..*
<<create>>
:TicketAgent
setItinerary(i)
calculateRoute()
route
<<destroy>>
notify()
Every 5 min.
liftReceiver
setDialtone
dialDigit(d)
routeCall(S,R)
<<CREATE>>
c:converse
ring
liftReceiver
connect
connect connect
Mail System
retrieve a message
«extends»
owner
change greeting
set password
add a mailbox
Administrator
delete a message
remove a mailbox
set a user's
password
Leave a message
caller
retrieve a message
Reach an extension
«uses»
«uses»
delete a message
caller
owner
Leave a message
: owner
dial(8888)
checkForInput
promptForExtension
dial(dddd)
ext:=getExtension()
create()
ext : extension
verifyExtension
lookup(ext:extension)
Notify
: caller
dial(dddd)
ext:=getExtension()
create
ext : extension
verifyExtension
promptForMessage
talk()
getMessage
create()
hangup mes : message
lookup(ext)
saveMessage(mes)
mailbox
1
1 1
2
extension
messageList
+create()
*
1
message
+create()
orderTaker TicketDB
t)
m ercos r)
sto me
ebit(cu it(custo
CreditBureau 3: d ckCred
e
1: ch
inputReader MailSystem
p(ext)
Lo oku ess)
5: ve(m
a
8: s
mailbox
/ FlipSwitch
on off
/ FlipSwitch
Access Mailbox
Update
Transactions
spell-check
Dictionary synonyms
add-new-word
J. Maletic Kent State University 96
Mail System
Mail System
InputReader
AdminMailbox
Mailbox
* -Server
* -Client
ATMKiosk
1 -server
* -client
ATMKiosk
ATM-GUI
Wind Computer
Wind
Direction
Speed
Sensor
Sensor
Tempature
Humidity
Sensor Barometer
Sensor
Mailbox.h
Inputreader.h
Mailbox.cpp
Mailsystem.cpp