Académique Documents
Professionnel Documents
Culture Documents
Learning Outcome
Describe
UML Diagrams:
Outline of this Class
Use Case
DoHomework
Unique name
Participating actors
Entry conditions
Exit conditions
Flow of events
Special requirements.
Actor
Student
Name
EndUser, Administrator
External system (Another system)
Physical environment (e.g. Weather)
Use Case
Actor.
System boundary
condition
13
14
Extend Relationship
Include Relationship
What Is a Relationship?
16
What Is an <<include>>
Relationship?
Student
HoldExercise
GiveLecture
<<include>>
<<include>>
<<extend>>
AskQuestion
<<extend>>
NoAnswer
<<include>> relationship
represents common
functionality needed in more
than one use case
The direction of a
<<include>> relationship
is to the using use case
(unlike the direction of the
<<extend>> relationship).
<<extend>>
WrongAnswer SillyQuestion
19
What Is an <<extend>>
Relationship?
20
Student
DoHomework
<<extend>>
Party
<<extend>>
<<extend>>
<<extend>>
Sleep
FetchLostSheet
DrinkCoffee
22
23
Student
5. Flow of events:
DoHomework
6. Special requirements:
None.
27
Event
Input
Actor (provide
input)
Department submits
class schedule
Department Class
schedule
Department
Registration request
Student
Output
University
class
schedule
Student Department
Lecturer
Student class
list
Student
Class roster
Lecturer
28
Use Cases
1.
Submit Department
Class Schedule
2.
Produce University
Class Schedule
3.
4.
Submit Department
Class Schedule
Department
Produce University
Class Schedule
Lecturer
Register for
Classes
Student
Produce
Class Roster
30
Flow of Events
an example
Use Case:
Actors:
1.
2.
3.
4.
5.
6.
Flow of Events an
example
Use Case:
Actors:
1.
2.
3.
4.
This use case begins when a department submits its schedule for
a term
The department provides the department code, course number,
section number, maximum number of seats, meeting time, meeting
place and instructor identifier for each section in the schedule
Records the section schedule information
On completion of entry of the schedule, the department indicates
that the schedule is complete
Flow of Events an
example
Use Case:
Actors:
1.
2.
This use case begins when it is time to produce the class rosters for
a term
Produces and displays the class rosters
33
Interaction Diagrams
34
Interaction diagrams
Sequence diagrams
Collaboration diagrams
Statechart diagrams
Activity diagrams
36
37
Interaction Diagrams:
Sequence Diagram
Syntax: [objectName]:[className]
Messages
Activation
Message
Interaction Diagrams:
Communication Diagrams
Also known as collaboration diagrams
Represents a collaboration, which is a set of
objects related in a particular context, and
interaction, which is a set of messages
exchanged among the objects within the
collaboration to achieve a desired outcome
sequences of messages are shown by
numbering
43
Communication Diagrams
1: insert ATM card
3: enter PIN code
7: enter amount
:ATMMachine
:Client
2: request PIN
6: request amount
10: dispense cash
11: print receipt
:SavingAccount
44
45
Sequence Vs Communication
Sequence Diagram:
Dynamic behavior of a set of objects arranged in
time sequence, new objects added to the right
Good for real-time specifications and complex
scenarios
easier to read
Communication Diagram :
Shows the relationship among objects.
Does not show time
Objects are arranged in a graph or network format
Both are used to examine the behavior of objects within
a single use case
46
Drawing Interaction
Diagram use case driven
47
48
49
Withdraw Saving
Bank Client
Flow of Events:
1. Bank client insert ATM card into ATM machine
2. ATM machine request PIN code
3. Bank client enter PIN code
4. Verify PIN code entered with saving account
5. ATM machine request amount if the PIN is valid
6. Bank client enter the required amount
7. Process the transaction in the client account
8. ATM machine dispense cash
9. ATM machine print receipt when the transaction completed
Alternative Flow of Events
50
51
Step 2
Set of the lifeline for each object
Lay out of messages from the top to the
bottom of the diagram based on the order
in which they sent
Add the execution occurrence to each
objects lifeline
Validate the sequence diagram
52
ATMMachine
Client
SavingAccount
53
:OrderForm
:Customer
:Order
:Customer
addOrderForCustomer()
addOrder()
add()
Stereotypes Classes
Mostly corresponds to
conceptual data model
classes
Encapsulates connections
between actors and use
cases
56
Typically, actors
interact with boundary
classes, which in turn
interact with control
classes, which in turn
interact with entity
classes.
57
58
UML Diagrams:
Outline of this Class
Summary
Use Case diagrams represent
external behavior (and internal
functionality)
Use Cases consist of diagrams and
textual description (of behavior,
actors, entry conditions, etc.)
Use Cases are needed to discuss the
systems functionality with users
Summary
UML interaction diagrams represent
behavior in terms of interactions
Useful to find missing objects
Time consuming to build but worth the
investment
Complement the class diagrams
(which represent structure)
References
Bruegge and Dutoit (2010)
Bennett, McRobb and Farmer (2010)
George, Batra, Valacich and Hoffer
(2007)