Professional Documents
Culture Documents
UML Sequence Diagrams 4 Use Case Analysis Sequence Diagram Basics Sequence Diagram Example From Sequence Diagrams to Class Diagrams
Michael Jones
Use Cases
Use Cases
title actors goal description
Michael Jones
Sequence Diagrams
can show event dependencies
Michael Jones
Describe objects
find the attributes and their types from the Use Case, the user,from general knowledge simple nouns (e.g., height) have simple types (e.g., int) computer complex nouns have object types (e.g., Date, String)
Michael Jones
Example
Use Case Description:
The customer asks the barman for a pint of beer. The barman pulls the pint, and then says the price. The customer hands over sufficient money. The barman rings up the price, puts the money in the till, and gives the customer any change. Example Objects and attributes
:Customer (objects are underlined with a colon before) cash - integer :Beer name - String price - currency sell by - Date
Michael Jones UML Sequence Diagrams 6
UML Sequence Diagrams Use Case Analysis 4 Sequence Diagram Basics Sequence Diagram Example From Sequence Diagrams to Class Diagrams
Michael Jones
Column is either:
a line (where the object doesnt exist) two lines (forming a rectangle) where the object exists
Conditions and actions associated with the object are drawn in at the point were they occur in the use case
conditions are enclosed in square brackets actions have round brackets appended
Michael Jones
System Border
:object1
:object2
:object3
new()
:object4
createNew()
local()
Time
Michael Jones
Fork - centralised
Stair - decentralised
Michael Jones
10
UML Sequence Diagrams Use Case Analysis Sequence Diagram Basics 4 Sequence Diagram Example From Sequence Diagrams to Class Diagrams
Michael Jones
11
one line on the order. We supply as many as we have (up to the number requested), and reorder if necessary. We reorder when the stock falls below the reorder level for that stock item.
Michael Jones
12
Michael Jones
13
Michael Jones
14
UML Sequence Diagrams Use Case Analysis Sequence Diagram Basics Sequence Diagram Example 4 From Sequence Diagrams to Class Diagrams
Michael Jones
15
attributes which can be set from outside the class are called properties these have get and set methods other attributes each have a get method
Michael Jones
16
Summary
Use Cases are analysed
to identify objects and their attributes to clarify the sequence of actions
e.g., nouns - domain and non-domain e.g., from Use Cases, domain knowledge attribute types: can be simple or computer complex
Sequence Diagrams
each object has a time line showing creation, destruction actions represented as horizontal arrows action name has round brackets afterwards conditions are enclosed in square brackets
Michael Jones