week 10 1 sequence diagrams. outline a)add scenarios to the system to describe how use cases are...
TRANSCRIPT
![Page 1: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/1.jpg)
Week 10
1
Sequence Diagrams
![Page 2: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/2.jpg)
Outline
a) Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects
b) Describe a scenario by applying sequence diagramsc) Draw Sequence diagrams for given case studies
2
![Page 3: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/3.jpg)
3
Sequence Diagram • Sequence diagram represents the dynamic
interaction between objects, or between actors and objects ordered in time.
• A sequence diagram is composed of a timeline, objects that interact across this timeline, and the messages that they exchange.
• Represent a scenario in the system
![Page 4: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/4.jpg)
Major Ingredients of a Sequence Diagram
4
: Patient
aPatient :Patient
1: enquiresAvailability
Patient ChecksAvailability of Doctor
The Actor
Object
Time Line
Message
Self Message
Focus of Control
Steps in the Sequence
NotesT his is an
explanatory note
![Page 5: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/5.jpg)
How do you start?
1. Identify the process/algorithm/activity you want to capture( may be a use case)
2. Identify the major objects involved 3. Map out the flow of control/ messages to
achieve the result
![Page 6: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/6.jpg)
Relating Sequence Diagrams to Class Diagrams
6
aPatient: Patient
1: checkPatientDetails( )
Patient
checkPatientDetails( )
Objects on Sequence Diagrams belong to Classes in Class Diagram
Messages on Sequence Diagrams come from Methods available to the Class on Class Diagrams
![Page 7: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/7.jpg)
A Layered Architecture
• Subsystems are shown as UML packages linked by dependencies
• A dependency without a stereotype means uses
7
![Page 8: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/8.jpg)
Advancing the Sequence Diagrams from Analysis to Design: Showing specific objects
: ActorPatientaDoctor :
Doctor
checkAvailability( )
: ActorPatientSystem
checkAvailability()
(A)Analysis Sequence DiagramRead “System”
(B)Design Sequence DiagramShows “Doctor” – a Specific object
8
![Page 9: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/9.jpg)
Representing objects
![Page 10: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/10.jpg)
Message between objects
![Page 11: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/11.jpg)
More on messages
![Page 12: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/12.jpg)
Indicating method calls
![Page 13: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/13.jpg)
Lifetime of objects
![Page 14: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/14.jpg)
Understanding Focus of Control and return message
aPatient : Patient
: Doctor
getSchedule( )
getAvailable( )
availability
Focus ofControl
ReturnProtocol
14
![Page 15: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/15.jpg)
Creating and Destroying an Object
: PatientForm
aPatient : Patient
bookConsultation( )
“Creating an Object”Shown with the arrow pointing directly to the Object
“Deleting an Object”Shown with a Cross on the Timeline
15
![Page 16: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/16.jpg)
![Page 17: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/17.jpg)
![Page 18: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/18.jpg)
![Page 19: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/19.jpg)
Manage course information• The sequence of steps carried out in the "Manage course information" flow
are:• A user who is a course administrator invokes the manage course
functionality. • The manage course functionality of the course administrator invokes either
the course creation or course modification functionality of a course. • After the course is either created or modified, the manage topic
functionality of the course administrator calls the topic creation or modification functionality of a topic.
• Finally, the user invokes the assign tutor to course functionality of the course administrator to assign a tutor to the selected course.
• Now, let us model these steps into a Sequence diagram for the "Manage course information" functionality.
![Page 20: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/20.jpg)
• the following use cases for the Courseware Management System were defined:– View courses – Manage topics for a course – Manage course information – View course calendar – View tutors – Manage tutor information – Assign courses to tutors
![Page 21: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/21.jpg)
![Page 22: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/22.jpg)
• Sketch a sequence diagram for the “normal” operation of an ATM (i.e. a customer inserts the card, enters his/her PIN, enters the amount, takes the card, and takes the money). The sequence diagram should show the interaction between the different components of the ATM. The ATM consists of the following components:
• • screen • keyboard • card reader • money tray • money output device • interface to banking server (for modifications of the account data of the
customer)•
![Page 23: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/23.jpg)
![Page 24: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/24.jpg)
24
Use Case: Have Dinner
Scope: Restaurant
Primary Actor: Customer
Normal Flow: 1. Customer is seated at a table2. Customer asks the waiter for the menu.3. Customer orders drink(s).4. Customer orders appetizer(s).5. Customer orders main course(s).6. Customer orders dessert(s).7. Customer asks for the bill.8. Customer pays the bill and receives change (if any).
Alternate Flow / Exceptions:
1.aCustomer asks the waiter for his or her name.
Restaurant Example
![Page 25: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/25.jpg)
25
![Page 26: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/26.jpg)
26
![Page 27: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/27.jpg)
27
A sequence diagram fragment that contain an alternative combination fragment
![Page 28: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/28.jpg)
28A sequence diagram with a loop combination fragment
![Page 29: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/29.jpg)
29
Make AppointmentUse Case-Analysis
Normal Flow: 1. Appointment clerk verifies that the needed medical service is provided by the hospital.
2. Appointment clerk records patient’s personal and contact data.
3. Appointment clerk records information about the referral source.
4. Appointment clerk consults hospital’s schedule to find a free slot for the required medical service.
5. Appointment clerk verifies that the patient is available for the appointment.
Loop 1: Repeat steps 4-5 until hospital’s schedule matches patient’s availability.
6. Appointment clerk makes the appointment. Loop 2: Repeat steps 4-6 for each appointment.
Alternate Flow/ Exceptions:
2.a Patient is not on file. Create new patient. (Extend: 141 - Create Patient.)
![Page 30: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/30.jpg)
30
![Page 31: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/31.jpg)
31
UML Extension Mechanisms • UML offers a set of mechanisms that
allow modeling to be refined, extended and adapted to specific needs.
• Stereotyping is the specialization of standard UML notations.
![Page 32: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/32.jpg)
32
UML Stereotyping
• UML stereotyping is typically simple but powerful: If any building block of UML is not specialized enough to express your specific needs, you may specialize it yourself by specifying a tag and/or assigning an icon.
![Page 33: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/33.jpg)
33
![Page 34: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/34.jpg)
34
![Page 35: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/35.jpg)
35
![Page 36: Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe](https://reader035.vdocument.in/reader035/viewer/2022081516/5697c00c1a28abf838cc8a3d/html5/thumbnails/36.jpg)
36
END