Slides material sources:
Lethbridge and Laganiere, Object-Oriented Software Engineering Practical Software
Development using UML and Java, 2005
Software Modeling – UML
www.cs.uoi.gr/~zarras/http://www.cs.uoi.gr/~zarras/se.htm
Use case diagrams
Software Modelling systems from master systems
Company
Starts by the company at the end of a
business quarter
Branching in two ways
Branch
in
the
normal
process
Branch
that
can
happen
sometime
during
the
normal
process
–
could
be
exceptional
cases
…..
…..
No change in the internal state.
For and While within use cases
(rarely, however)
The system is up and running
The system is up and running
No change in the internal state of the system
No change in system state.
No change in the internal state of the system
Package diagrams
Packages logically group other elements
(packages, classes, etc.)
A dependency from A to B means that
A is based on functionality provided by B.
I also means that changing B may affect A.
Class diagrams
© Lethbridge/Laganière 2005
Classes
operationName(parameterName: parameterType …): returnType
© Lethbridge/Laganière 2005
Associations & Multiplicity
An association is used to show how instances (objects) of two
classes are related/collaborate to/with each other
 Symbols indicating multiplicity are shown at each end of the
association
*** in the
implementation this
relation could
represent any form of
interaction between
objects that are created
by other objects,
passed as parameters
to other objects etc.
© Lethbridge/Laganière 2005
Labelling associations
Each association can be labelled, to make explicit the nature of the
association and the roles of the classes. Association name is in the
middle, roles are depicted near the classes.
© Lethbridge/Laganière 2005
Reflexive associations
It is possible for an association to connect a class to itself
© Lethbridge/Laganière 2005
Directionality in associations
Associations are by default bi-directional
It is possible to limit the direction of an association by adding an
arrow at one end
It determines in more detail how instances refer to each other,
Day objects refer to Note objects
© Lethbridge/Laganière 2005
Aggregation
Aggregations are special associations that represent ‘part-whole’
relationships.
*** in the implementation the “parts” are typically class
attributes of the “whole” class
 The ‘whole’ side is often called the assembly or the
aggregate
 This symbol is a shorthand notation association named
isPartOf
 In general, the parts may be shared among different
assemblies/aggregates
 Technically the aggregate class has fields/attributes of the
part class
Order Address
1
*
Company Address
1
*
class Order {
private Address addr;
private ……
……..
public Order(Address a) {
addr = a;
}
…..
}
class Address {
…….
……
}
main() {
Address a = new Address();
// two orders with a shared address
Order o1 = new Order(a);
Order o2 = new Order(a);
}
© Lethbridge/Laganière 2005
Composition
A composition is a strong kind of aggregation
 The parts cannot be shared among different
assemblies/aggregates
*** in the implementation the “parts” are typically
class attributes of the “whole” class
How can we tell if not shared?
The “parts” objects are created by the “whole”
The “whole” does not provide ways (e.g. getters) for
getting references to the “parts”
class Building {
private Room livingRoom;
private ……
……..
public Building() {
// creates its own rooms
livingRoom = new Room();
}
// buildings cant share references to the same rooms via getters/setters
…..
}
class Room {
…….
……
}
main() {
// Buildings can not have common rooms
Building b1 = new Building ();
Building b2 = new Building ();
}
© Lethbridge/Laganière 2005
Generalization
Specializing a superclass into two or more subclasses
 A generalization set is a labelled group of generalizations with a
common superclass
 The label (sometimes called the discriminator) describes the
criteria used in the specialization
*** in the implementation this is
done by extension/inheritance
© Lethbridge/Laganière 2005
Interfaces
An interface describes a portion of the visible behaviour of a set of
objects.
Note that conceptually ATM and Employee are not
related somehow we have machines vs people …
However with the interface we specify that some of the
functionalities (a specific contract) they provide are the
“same” and people and machines can play the same role
– “cashier”
Sequence diagrams
© Lethbridge/Laganière 2005
A class diagram does not tell us how do the
class objects collaborate to realize a particular
functionality/use case
© Lethbridge/Laganière 2005
Basic interactions
Happen during execution
of requestToRegister()
Rectangle
represents
the method
execution
© Lethbridge/Laganière 2005
Basic interactions Is it correct with respect to the class
diagram???
© Lethbridge/Laganière 2005
Alternative, optional interactions
Alternative, optional interactions
Similarly can use an [alt] construct to show
alternative flows
http://www.tracemodeler.com/articles/a_quick_introduction_to_uml_sequence_diagrams/
© Lethbridge/Laganière 2005
Iterative interactions
computeTotal
More on UML diagrams ….
Use Case Diagrams - Advanced
Features
Refines an abstract step of
Open File
Refines an abstract step of
Open File
Use case and Actor specializations
Use case: Open file
ID:UC1
Actors:
Ordinary User
Related use cases:
Generalization of:
• Open file by typing name
• Open file by browsing
Pre conditions: The application is up and running
Basic Flow:
1. The use case starts when the user chooses the “Open” command
2. The file open dialog appears.
3. The user specifies a file name
4. The user confirms the selection
5. The file open dialog disappears
Post conditions: The contents of the file are available to the user for further processing
Use case: Open file by typing name
ID:UC2
Actors:
Ordinary User
Related use cases: Specialization of: Open file
Pre conditions: The application is up and running
Basic Flow:
1. The use case starts when the user chooses the “Open” command
2. The file open dialog appears.
3. The user specifies a file name
1.The user selects the text field
2.The user types the file name
4. The user confirms the selection
5. The file open dialog disappears
Post conditions: The contents of the file are available to the user for further processing
Alternative flow:
1. A file not found exception is raised by the system
2. The application indicates the file the user specified does not exist
3. The user corrects the file name in the text field
Post conditions: The use case continues from step 4 of the main flow
Use case: Open file by browsing
ID:UC4
Actors:
Ordinary User
Related use cases: Specialization of: Open file
Pre conditions: The application is up and running
Basic Flow:
1. The use case starts when the user chooses the “Open” command
2. The file open dialog appears.
3. The user specifies a file name
1.While the desired file is not displayed in the files list of the file browser
1. The user selects a directory from the list
2.The application displays the contents of the directory in the files list
2.The user selects the desired file
4. The user confirms the selection
5. The file open dialog disappears
Post conditions: The contents of the file are available to the user for further processing
Refines an abstract step of
Open File
Refines an abstract step of
Open File
Describes a branching
flow that is complex OR
used in >1 use cases and
can stand as a separate
use case
Describes a part of
the normal flow
that is complex OR
used in >1 use cases
and can stand as a
separate use case
Use case: Open file by typing name
ID:UC2
Actors:
Ordinary User
Related use cases:
Specialization of: Open file
Extended by: Attempt to open file that does not exist
Pre conditions: The application is up and running
Basic Flow:
1. The use case starts when the user chooses the “Open” command
2. The file open dialog appears.
3. The user specifies a file name
1.The user selects the text field
2.The user types the file name
4. The user confirms the selection
5. The file open dialog disappears
Post conditions: The contents of the file are available to the user for further processing
Alternative flow:
Attempt to open file that does not exist
Use case: Attempt to open file that does not exist
ID:UC3
Actors:
Ordinary User
Related use cases:
Extension of: Open file by typing name
Pre conditions: The user executes UC2
Basic Flow:
1. A file not found exception is raised
2. The application indicates the file the user specified does not exist
3. The user corrects the file name in the text field
Post conditions: The main flow of UC2 continues at step 4
Use case: Open file by browsing
ID:UC4
Actors:
Ordinary User
Related use cases:
Specialization of: Open file
Includes: Browse for file
Pre conditions: The application is up and running
Basic Flow:
1. The use case starts when the user chooses the “Open” command
2. The file open dialog appears.
3. The user specifies a file name
1.Browse for file
4. The user confirms the selection
5. The file open dialog disappears
Post conditions: The contents of the file are available to the user for further processing
Use case: Browse for file
ID:UC5
Actors:
Ordinary User
Related use cases:
Included by: Open file by browsing
Pre conditions: The application is up and running
Basic Flow:
1. The use case starts at step 3 of UC4
2. While the desired file is not displayed in the files list of the file browser
1. The user selects a directory from the list
2.The application displays the contents of the directory in the files list
3.The user selects the desired file
Post conditions: UC 4 continues at step 4
State diagrams
© Lethbridge/Laganière 2005
State diagrams
 Can be used to describe an automaton at the requirements
level or at design/implementation level (how does a class
works)
 tic-tac-toe game (also called noughts and crosses)
Requirements specification for the game
© Lethbridge/Laganière 2005
States
 At any given point in time, the system/object is in one state.
 A state is represented by a rounded rectangle containing the
name of the state.
 Special states:
 A black circle represents the start state
 A circle with a ring around it represents an end state
Transitions, actions, activities
 A transition represents a change of state in response to an event.
 It is considered to occur instantaneously.
 The transition may be labeled :
 trigger is the cause of the transition, which could be a signal, an
event, a change in some condition, or the passage of time.
 guard is a condition which must be true in order for the trigger to
cause the transition.
 action is an action which will be invoked directly on the object that is
described by the state machine as a result of the transition.
[trigger] [guard] / [action]
Transitions, actions, activities
 A state may have an associated entry behavior. This behavior, if defined, is
executed whenever the State is entered.
 A state may also have an associated exit behavior, which, if defined, is
executed whenever the state is exited.
 A State may also have an associated doActivity behavior. This behavior
commences execution when the state is entered (but only after the state
entry behavior has completed) and executes until it completes or the state
is exited.
© Lethbridge/Laganière 2005
Time-outs and conditions
e.g. traffic light control logic
Activity diagrams
© Lethbridge/Laganière 2005
Activity Diagrams
 An activity diagram
is typically used for
process/algorithm
modelling
 One of the
strengths of activity
diagrams is the
representation of
concurrent
activities.
© Lethbridge/Laganière 2005
Representing concurrency
 Concurrency is shown using forks, joins and rendezvous.
 A fork has one incoming transition and multiple outgoing transitions.
 The execution splits into two concurrent threads.
 A join has multiple incoming transitions and one outgoing transition.
 The outgoing transition will be taken when all incoming transitions
have occurred.
 The incoming transitions occur in separate threads.
 If one incoming transition occurs, a wait condition occurs at the
join until the other transitions occur.
 A rendezvous has multiple incoming and multiple outgoing transitions.
 Once all the incoming transitions occur all the outgoing transitions
may occur.
© Lethbridge/Laganière 2005
Swimlanes
 Activity diagrams
are most often
associated with
objects of several
classes.
 The partition of
activities among
the existing
classes can be
explicitly shown
using swimlanes.

More Related Content

DOCX
CS101S. ThompsonUniversity of BridgeportLab 7 Files, File.docx
PDF
Java IO
PPT
M03 1 Structuraldiagrams
PPT
M03_1_StructuralDiagrams in unified modeling language
PDF
Perfomatix - Java Coding Standards
PDF
PPT
M03_1_Structur alDiagrams.ppt
PPTX
epicenter2010 Open Xml
CS101S. ThompsonUniversity of BridgeportLab 7 Files, File.docx
Java IO
M03 1 Structuraldiagrams
M03_1_StructuralDiagrams in unified modeling language
Perfomatix - Java Coding Standards
M03_1_Structur alDiagrams.ppt
epicenter2010 Open Xml

Similar to Software Modelling systems from master systems (20)

PDF
MCA NOTES.pdf
PPT
Android coding guide lines
PPTX
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
PPT
Savitch ch 06
PDF
Basic i/o & file handling in java
PPT
DOCX
Assessment item 1 File Systems and Advanced Scripting .docx
PDF
Understanding Operating Systems 5th Edition McHoes Solutions Manual
PDF
Download full ebook of Solution Manual for COMP 3, 3rd Edition instant downlo...
PPTX
File handling.pptx
PDF
Understanding Operating Systems 5th Edition McHoes Solutions Manual
PPTX
Ch 1 Introduction to Object Oriented Programming.pptx
PDF
C++ for Engineers and Scientists 4th Edition Bronson Solutions Manual
PDF
M.c.a. (sem iv)- java programming
DOCX
Attach
PDF
C++ for Engineers and Scientists 4th Edition Bronson Solutions Manual
PDF
Understanding Operating Systems 5th Edition McHoes Solutions Manual
PPT
Lecture 9
PDF
Understanding Operating Systems 5th Edition McHoes Solutions Manual
PDF
C++ for Engineers and Scientists 4th Edition Bronson Solutions Manual
MCA NOTES.pdf
Android coding guide lines
FAST PHRASE SEARCH FOR ENCRYPTED CLOUD STORAGE.pptx
Savitch ch 06
Basic i/o & file handling in java
Assessment item 1 File Systems and Advanced Scripting .docx
Understanding Operating Systems 5th Edition McHoes Solutions Manual
Download full ebook of Solution Manual for COMP 3, 3rd Edition instant downlo...
File handling.pptx
Understanding Operating Systems 5th Edition McHoes Solutions Manual
Ch 1 Introduction to Object Oriented Programming.pptx
C++ for Engineers and Scientists 4th Edition Bronson Solutions Manual
M.c.a. (sem iv)- java programming
Attach
C++ for Engineers and Scientists 4th Edition Bronson Solutions Manual
Understanding Operating Systems 5th Edition McHoes Solutions Manual
Lecture 9
Understanding Operating Systems 5th Edition McHoes Solutions Manual
C++ for Engineers and Scientists 4th Edition Bronson Solutions Manual
Ad

Recently uploaded (20)

PPTX
Tech Workshop Escape Room Tech Workshop
PDF
E-Commerce Website Development Companyin india
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
Guide to Food Delivery App Development.pdf
PPTX
most interesting chapter in the world ppt
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
Download Adobe Photoshop Crack 2025 Free
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Cybersecurity: Protecting the Digital World
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PPTX
Airline CRS | Airline CRS Systems | CRS System
Tech Workshop Escape Room Tech Workshop
E-Commerce Website Development Companyin india
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Guide to Food Delivery App Development.pdf
most interesting chapter in the world ppt
CNN LeNet5 Architecture: Neural Networks
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Download Adobe Photoshop Crack 2025 Free
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
How Tridens DevSecOps Ensures Compliance, Security, and Agility
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Weekly report ppt - harsh dattuprasad patel.pptx
Cybersecurity: Protecting the Digital World
MCP Security Tutorial - Beginner to Advanced
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Airline CRS | Airline CRS Systems | CRS System
Ad

Software Modelling systems from master systems

  • 1. Slides material sources: Lethbridge and Laganiere, Object-Oriented Software Engineering Practical Software Development using UML and Java, 2005 Software Modeling – UML www.cs.uoi.gr/~zarras/http://www.cs.uoi.gr/~zarras/se.htm
  • 4. Company Starts by the company at the end of a business quarter
  • 5. Branching in two ways Branch in the normal process Branch that can happen sometime during the normal process – could be exceptional cases ….. ….. No change in the internal state.
  • 6. For and While within use cases (rarely, however) The system is up and running The system is up and running No change in the internal state of the system No change in system state. No change in the internal state of the system
  • 8. Packages logically group other elements (packages, classes, etc.) A dependency from A to B means that A is based on functionality provided by B. I also means that changing B may affect A.
  • 11. © Lethbridge/Laganière 2005 Associations & Multiplicity An association is used to show how instances (objects) of two classes are related/collaborate to/with each other  Symbols indicating multiplicity are shown at each end of the association *** in the implementation this relation could represent any form of interaction between objects that are created by other objects, passed as parameters to other objects etc.
  • 12. © Lethbridge/Laganière 2005 Labelling associations Each association can be labelled, to make explicit the nature of the association and the roles of the classes. Association name is in the middle, roles are depicted near the classes.
  • 13. © Lethbridge/Laganière 2005 Reflexive associations It is possible for an association to connect a class to itself
  • 14. © Lethbridge/Laganière 2005 Directionality in associations Associations are by default bi-directional It is possible to limit the direction of an association by adding an arrow at one end It determines in more detail how instances refer to each other, Day objects refer to Note objects
  • 15. © Lethbridge/Laganière 2005 Aggregation Aggregations are special associations that represent ‘part-whole’ relationships. *** in the implementation the “parts” are typically class attributes of the “whole” class  The ‘whole’ side is often called the assembly or the aggregate  This symbol is a shorthand notation association named isPartOf  In general, the parts may be shared among different assemblies/aggregates  Technically the aggregate class has fields/attributes of the part class Order Address 1 * Company Address 1 *
  • 16. class Order { private Address addr; private …… …….. public Order(Address a) { addr = a; } ….. } class Address { ……. …… } main() { Address a = new Address(); // two orders with a shared address Order o1 = new Order(a); Order o2 = new Order(a); }
  • 17. © Lethbridge/Laganière 2005 Composition A composition is a strong kind of aggregation  The parts cannot be shared among different assemblies/aggregates *** in the implementation the “parts” are typically class attributes of the “whole” class How can we tell if not shared? The “parts” objects are created by the “whole” The “whole” does not provide ways (e.g. getters) for getting references to the “parts”
  • 18. class Building { private Room livingRoom; private …… …….. public Building() { // creates its own rooms livingRoom = new Room(); } // buildings cant share references to the same rooms via getters/setters ….. } class Room { ……. …… } main() { // Buildings can not have common rooms Building b1 = new Building (); Building b2 = new Building (); }
  • 19. © Lethbridge/Laganière 2005 Generalization Specializing a superclass into two or more subclasses  A generalization set is a labelled group of generalizations with a common superclass  The label (sometimes called the discriminator) describes the criteria used in the specialization *** in the implementation this is done by extension/inheritance
  • 20. © Lethbridge/Laganière 2005 Interfaces An interface describes a portion of the visible behaviour of a set of objects. Note that conceptually ATM and Employee are not related somehow we have machines vs people … However with the interface we specify that some of the functionalities (a specific contract) they provide are the “same” and people and machines can play the same role – “cashier”
  • 22. © Lethbridge/Laganière 2005 A class diagram does not tell us how do the class objects collaborate to realize a particular functionality/use case
  • 23. © Lethbridge/Laganière 2005 Basic interactions Happen during execution of requestToRegister() Rectangle represents the method execution
  • 24. © Lethbridge/Laganière 2005 Basic interactions Is it correct with respect to the class diagram???
  • 26. Alternative, optional interactions Similarly can use an [alt] construct to show alternative flows http://www.tracemodeler.com/articles/a_quick_introduction_to_uml_sequence_diagrams/
  • 27. © Lethbridge/Laganière 2005 Iterative interactions computeTotal
  • 28. More on UML diagrams ….
  • 29. Use Case Diagrams - Advanced Features
  • 30. Refines an abstract step of Open File Refines an abstract step of Open File Use case and Actor specializations
  • 31. Use case: Open file ID:UC1 Actors: Ordinary User Related use cases: Generalization of: • Open file by typing name • Open file by browsing Pre conditions: The application is up and running Basic Flow: 1. The use case starts when the user chooses the “Open” command 2. The file open dialog appears. 3. The user specifies a file name 4. The user confirms the selection 5. The file open dialog disappears Post conditions: The contents of the file are available to the user for further processing
  • 32. Use case: Open file by typing name ID:UC2 Actors: Ordinary User Related use cases: Specialization of: Open file Pre conditions: The application is up and running Basic Flow: 1. The use case starts when the user chooses the “Open” command 2. The file open dialog appears. 3. The user specifies a file name 1.The user selects the text field 2.The user types the file name 4. The user confirms the selection 5. The file open dialog disappears Post conditions: The contents of the file are available to the user for further processing Alternative flow: 1. A file not found exception is raised by the system 2. The application indicates the file the user specified does not exist 3. The user corrects the file name in the text field Post conditions: The use case continues from step 4 of the main flow
  • 33. Use case: Open file by browsing ID:UC4 Actors: Ordinary User Related use cases: Specialization of: Open file Pre conditions: The application is up and running Basic Flow: 1. The use case starts when the user chooses the “Open” command 2. The file open dialog appears. 3. The user specifies a file name 1.While the desired file is not displayed in the files list of the file browser 1. The user selects a directory from the list 2.The application displays the contents of the directory in the files list 2.The user selects the desired file 4. The user confirms the selection 5. The file open dialog disappears Post conditions: The contents of the file are available to the user for further processing
  • 34. Refines an abstract step of Open File Refines an abstract step of Open File Describes a branching flow that is complex OR used in >1 use cases and can stand as a separate use case Describes a part of the normal flow that is complex OR used in >1 use cases and can stand as a separate use case
  • 35. Use case: Open file by typing name ID:UC2 Actors: Ordinary User Related use cases: Specialization of: Open file Extended by: Attempt to open file that does not exist Pre conditions: The application is up and running Basic Flow: 1. The use case starts when the user chooses the “Open” command 2. The file open dialog appears. 3. The user specifies a file name 1.The user selects the text field 2.The user types the file name 4. The user confirms the selection 5. The file open dialog disappears Post conditions: The contents of the file are available to the user for further processing Alternative flow: Attempt to open file that does not exist
  • 36. Use case: Attempt to open file that does not exist ID:UC3 Actors: Ordinary User Related use cases: Extension of: Open file by typing name Pre conditions: The user executes UC2 Basic Flow: 1. A file not found exception is raised 2. The application indicates the file the user specified does not exist 3. The user corrects the file name in the text field Post conditions: The main flow of UC2 continues at step 4
  • 37. Use case: Open file by browsing ID:UC4 Actors: Ordinary User Related use cases: Specialization of: Open file Includes: Browse for file Pre conditions: The application is up and running Basic Flow: 1. The use case starts when the user chooses the “Open” command 2. The file open dialog appears. 3. The user specifies a file name 1.Browse for file 4. The user confirms the selection 5. The file open dialog disappears Post conditions: The contents of the file are available to the user for further processing
  • 38. Use case: Browse for file ID:UC5 Actors: Ordinary User Related use cases: Included by: Open file by browsing Pre conditions: The application is up and running Basic Flow: 1. The use case starts at step 3 of UC4 2. While the desired file is not displayed in the files list of the file browser 1. The user selects a directory from the list 2.The application displays the contents of the directory in the files list 3.The user selects the desired file Post conditions: UC 4 continues at step 4
  • 40. © Lethbridge/Laganière 2005 State diagrams  Can be used to describe an automaton at the requirements level or at design/implementation level (how does a class works)  tic-tac-toe game (also called noughts and crosses) Requirements specification for the game
  • 41. © Lethbridge/Laganière 2005 States  At any given point in time, the system/object is in one state.  A state is represented by a rounded rectangle containing the name of the state.  Special states:  A black circle represents the start state  A circle with a ring around it represents an end state
  • 42. Transitions, actions, activities  A transition represents a change of state in response to an event.  It is considered to occur instantaneously.  The transition may be labeled :  trigger is the cause of the transition, which could be a signal, an event, a change in some condition, or the passage of time.  guard is a condition which must be true in order for the trigger to cause the transition.  action is an action which will be invoked directly on the object that is described by the state machine as a result of the transition. [trigger] [guard] / [action]
  • 43. Transitions, actions, activities  A state may have an associated entry behavior. This behavior, if defined, is executed whenever the State is entered.  A state may also have an associated exit behavior, which, if defined, is executed whenever the state is exited.  A State may also have an associated doActivity behavior. This behavior commences execution when the state is entered (but only after the state entry behavior has completed) and executes until it completes or the state is exited.
  • 44. © Lethbridge/Laganière 2005 Time-outs and conditions e.g. traffic light control logic
  • 46. © Lethbridge/Laganière 2005 Activity Diagrams  An activity diagram is typically used for process/algorithm modelling  One of the strengths of activity diagrams is the representation of concurrent activities.
  • 47. © Lethbridge/Laganière 2005 Representing concurrency  Concurrency is shown using forks, joins and rendezvous.  A fork has one incoming transition and multiple outgoing transitions.  The execution splits into two concurrent threads.  A join has multiple incoming transitions and one outgoing transition.  The outgoing transition will be taken when all incoming transitions have occurred.  The incoming transitions occur in separate threads.  If one incoming transition occurs, a wait condition occurs at the join until the other transitions occur.  A rendezvous has multiple incoming and multiple outgoing transitions.  Once all the incoming transitions occur all the outgoing transitions may occur.
  • 48. © Lethbridge/Laganière 2005 Swimlanes  Activity diagrams are most often associated with objects of several classes.  The partition of activities among the existing classes can be explicitly shown using swimlanes.

Editor's Notes

  • #30: If we have a complex flow we can split to more use cases that are included in, OR extend, the main use case
  • #34: If we have a complex flow we can split to more use cases that are included in, OR extend, the main use case