Anda di halaman 1dari 25

1

BM63B3 – System Analysis and Design

Behavioral Analysis and


Design
Puspita Kencana Sari

S1 Manajemen- Fakultas Ekonomi & Bisnis


2

1. Sequence Diagram

2
3

Sequence Diagram

• Gambarkan rangkaian interaksi antara kelas atau instan objek


dari waktu ke waktu
• Sering digunakan untuk menunjukkan pemrosesan yang
dijelaskan dalam skenario use case
• Digunakan untuk menunjukkan pola keseluruhan aktivitas
atau interaksi dalam kasus penggunaan

3
4

• Beberapa analis bisnis menggunakan diagram urutan sebagai


alternatif diagram aktivitas dengan partisi (swimlanes). Selain
itu, BA cenderung lebih kesulitan menggunakan diagram ini
dibandingkan diagram aktivitas dengan partisi. Untuk alasan
ini, diagram sekuens tidak disarankan untuk penggunaan BA.
Di sisi lain, diagram urutan adalah cara terbaik untuk
merancang distribusi operasi antar kelas untuk tujuan
pemrograman.

4
5

2. Sequence Diagram Component

5
6

Komponen Utama

• Object/Class/Lifeline
• Interface/Boundary
• Control
• Entity/Database

• Message
• Synchronous message
• Return message
• Self message
• Recursive message

• Activation Bar
• Actor

6
7

Sequence Diagram Syntax

AN ACTOR

anObject:aClass

AN OBJECT

aMessage()
A LIFELINE
Slide 7
x
8

3. Sequence Diagram Syntax

8
9

 Actors dan objects ditempatkan di atas


aPatient, aReceptionist, Patients, UnpaidBills, Appointments, and an Appt
Tidak ditempatkan dalam urutan tertentu
Untuk setiap objek, nama kelas diberikan setelah nama objek
• Patients:List
• Patients adalah turunan dari kelas Daftar yang berisi objek pasien individu.

 Suatu objek dapat membuat objek lain


 Pesan dikirim langsung ke objek, bukan ke jalur kehidupannya

Slide 9
10

Simbol Khusus Digunakan untuk Menggambar


Sequence Diagram (Figure 10.10)

30/11/21

10-10
10-10
11
Sequence Diagram untuk Penerimaan Siswa: Sequence Diagrams Menekankan
Pengaturan Waktu Pesan (Figure 10.11)

30/11/21

10-11
10-11
12

Sequence Diagram
untuk Menggunakan
Dua Halaman Web:
Satu untuk Informasi
Siswa, Satu untuk
Informasi Kursus
(Figure 10.15 )
30/11/21

10-12
10-12
13

4. Creating Sequence Diagram

13
14

Create Sequence Diagrams

• Sertakan aktor dari diagram use case


30/11/21
• Tentukan satu atau lebih kelas antarmuka untuk setiap aktor
• Setiap kasus penggunaan harus memiliki satu kelas kontrol
• Periksa kasus penggunaan untuk melihat kelas entitas apa yang
diperlukan
• Diagram sekuens dapat dimodifikasi saat melakukan desain
detail
10-14
10-14
15

Example – Buy Railway Ticket


16

Example - Withdraw Money


17

5. Example of Sequence Diagram


1

17
18

CASE 1

Explain
operation in
this diagram!
19

6. Example of Sequence Diagram


2

19
20

SD: Online Shop


21

7. Example of Sequence Diagram


3

21
22

Case 2

• The Convener selects a case on the Disbursement GUI (graphical user


interface) screen.
• The Disbursement GUI sends the message QueryCase() to the Disbursement
Control object, requesting it to query payment-related details about the case.
• The Disbursement Control object services this request by passing a number of
messages to the Case object. These include GetPaymentAmount(),
GetPcMember(), and GetPcAccount(). These are requests to retrieve payment
and Peace Committee member information relevant to the case. (To keep the
diagram simple, only one Peace Committee member account is shown, though
more are involved.)
23

Case 2 - Cont

• The Convener approves the disbursement for the case.


• The GUI responds to the approval by sending the message CreatePayments() to the
Disbursement Control object.
• The Disbursement Control object responds by sending a Create() message to each
required Payment object. (The diagram only shows one of these.) Though not shown on
this draft of the diagram, payment details such as the destination and amount of the
payment are passed at this time as arguments.
• The Payment object sends a Withdraw() message to the Cash Account and a Deposit()
message to the Peace Committee member account.
• The Disbursement Control object finishes the process by sending the message
SetPaidStatus() to the Case object to indicate that payments have been made.
24

Case 2 - Answer
25

THANK YOU

25

Anda mungkin juga menyukai