Modeling Behavior with UML - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Modeling Behavior with UML

Description:

Activity is modeled by another activity diagram (cf. DFDs? ... Splitting the flow of control into multiple threads. Synchronization. Splitting. Archive ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 24
Provided by: compu62
Category:

less

Transcript and Presenter's Notes

Title: Modeling Behavior with UML


1
Modeling Behavior with UML
  • CS 3300
  • Fall, 2000

2
Overview
  • Sequence diagrams
  • Activity diagrams
  • Summary

3
UML Sequence Diagrams
  • In requirements analysis
  • To refine use case descriptions
  • to find additional objects (participating
    objects)
  • In system design
  • to refine subsystem interfaces
  • Columns classes
  • Arrows messages
  • Narrow rectangles activations
  • Dashed lines lifelines

selectZone()
insertCoins()
pickupChange()
pickUpTicket()
4
UML Sequence Diagrams Nested Messages
ZoneButton
to be continued...
  • The source of an arrow indicates the activation
    which sent the message
  • An activation is as long as all nested activations

5
Figure 2-29. Example of a sequence diagram
setting the time on 2Bwatch.
6
Figure 2-30. Examples of conditions and iterators
in sequence diagrams.
7
Sequence Diagram Observations
  • UML sequence diagram represent behavior in terms
    of interactions.
  • They complement class diagrams, which represent
    structure.
  • Useful for finding participating objects.
  • Time-consuming to build but worth the investment
    where interactions are complex.

8
Figure 2-31. A UML statechart diagram for the
Incident class.
Active
Inactive
Closed
Archived
incidentHandled
incidentDocumented
incidentArchived
9
Figure 2-32. Statechart diagram for 2Bwatch set
time function.
pressButtonsLAndR
after 2 min.
pressButtonsLAndR/beep
after 20 years
after 20 years
10
Figure 2-33. Internal transitions associated with
the SetTime state (UML statechart diagram).
11
Figure 2-34. Refined statechart associated with
the SetTime state (UML statechart diagram).
12
Activity Diagrams
  • An activity diagram shows flow control within a
    system
  • An activity diagram is a special case of a state
    chart diagram in which states are activities
    (functions)

13
Activity Diagrams
  • Two types of states
  • Action state
  • Cannot be decomposed any further
  • Happens instantaneously with respect to
  • level of abstraction used in the model
  • Activity state
  • Can be decomposed further
  • Activity is modeled by another activity diagram
  • (cf. DFDs?)

14
Activity Diagram Modeling Decisions
15
Activity Diagrams Modeling Concurrency
  • Synchronization of multiple activities
  • Splitting the flow of control into multiple
    threads

16
Activity Diagrams Swimlanes
  • Actions may be grouped into swimlanes to denote
    the object or subsystem that implements the
    actions.

17
Report

Emergency
Dispatcher
OpenIncident
FieldOfficer
AllocateResources
ArchiveIncident
ManageUsers
Librarian
SysAdmin
SearchArchive
ManageTerminals
18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
Summary
  • UML provides a wide variety of notations for
    representing many aspects of software
    development
  • We concentrate only on a few notations
  • Functional model use case diagram
  • Object model class diagram
  • Dynamic model sequence diagrams, statechart and
    activity diagrams
  • UML is not a methodology, but the textbook
    describes a methodology that uses UML
Write a Comment
User Comments (0)
About PowerShow.com