Download presentation
Presentation is loading. Please wait.
Published byChrystal Nelson Modified over 8 years ago
1
UML Review Sequence Diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
2
Sequence diagram from SE1021 Lab 9: http://people.msoe.edu/~hornick/Courses/se1021/labs/se1021_Drawing%20Program%202010%20Part%202.htm SE-2030 Dr. Rob Hasker 2 What does a Sequence diagram illustrate?
3
Sequence diagrams illustrate high-level interactions (method calls) between class instances A UML Sequence Diagram represents classes and/or class instances (objects) and their interactions with one another Classes and objects can interact with one another in many different ways during the course of execution of a program A given Sequence Diagram shows just one interaction for a specific circumstance (e.g. writing data to a file, or processing a single button click) SE-2030 Dr. Rob Hasker 3 ATM checking : Account savings : Account status = withdraw(100); status = deposit(100);
4
Notation & representation The name of the class appears at the top of a Sequence Diagram rectangle, which can also (optionally) include the name of the object representing a particular instance of that class: UML Syntax: [ ]: SE-2030 Dr. Rob Hasker 4 chkAcct : Account chkAcct is the name of the reference to an instance of an Account
5
Sometimes, you may want to show conditional logic (selection) in a Sequence Diagram -although this is usually too much detail to show at this level SE-2030 Dr. Rob Hasker 5
6
Similarly, you can illustrate iteration SE-2030 Dr. Rob Hasker 6
7
Review Review of Sequence Diagram notation Be sure the type (class) of each object is specified! Note name of arrow is the name of a method in the target class You will rarely show every bit of logic – at some point other notations become more appropriate. Each sequence diagram shows just one interaction. SE-2030 Dr. Rob Hasker 7
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.