ANALISIS DAN PERANCANGAN SISTEM (APS)
ANALISIS DAN PERANCANGAN
SISTEM (APS)
Pemodelan Kebutuhan:
Pendekatan Terstruktur
Tujuan perkuliahan
Memahami pemodelan yang dibutuhkan dalam
rekayasa kebutuhan
Memahami konsep pendekatan terstruktur dalam
pemodelan kebutuhan
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
2/26
Agenda
Konsep pemodelan kebutuhan
Konsep pemodelan terstruktur
Elemen-elemen pemodelan terstruktur
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
3/26
Konsep pemodelan kebutuhan
Model kebutuhan menjembatani antara deskripsi
sistem secara umum dengan model perancangan
Tujuan utama model kebutuhan:
– Menjelaskan apa yang dibutuhkan oleh customer
– Menjadi dasar bagi perancangan PL
– Menjadi referensi dalam melakukan validasi
kebutuhan
Metode: terstruktur & berorientasi objek
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
4/26
Prinsip pemodelan kebutuhan
Model yang dibuat harus fokus pada kebutuhan yang
relevan dengan domain permasalahan WHAT
Setiap model kebutuhan harus bisa dilacak ke model
perancangan traceability
Setiap elemen dalam model kebutuhan harus
mampu memperjelas pemahaman secara utuh
terhadap kebutuhan PL domain masalah,
fungsionalitas dan perilaku sistem
Minimalisasi kopling antar klas/modul
Pastikan bahwa model kebutuhan memiliki nilai
manfaat untuk seluruh stakeholders
Model dibuat sesederhana mungkin notasi yang
sederhana, non duplikasi informasi
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
5/26
Tipe-tipe model kebutuhan
Scenario-based models
– Berdasarkan sudut pandang aktor
Data models
– Menjelaskan domain informasi dari masalah
Class-oriented models
– Merepresentasikan klas-klas yang relevan dengan
kebutuhan PL
Flow-oriented models
– Merepresentasikan proses dan data dari sistem
Behavioral models
– Merepresentasikan perilaku sistem berdasar event
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
6/26
Pemodelan Terstruktur
Konsep
Pertama kali dipopulerkan oleh T. DeMarco
(1979) Structured Analysis and System
Specification
Perluasan notasi untuk kebutuhan real-time
systems oleh Hatley dan Pirbhai (1987) – SA/RT
Strategies for Real-Time System Specification
Processes
Data
Behavior
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
8/26
Elemen-elemen pemodelan
Data Object
Description
Data Flow
Diagram
(DFD)
ER Diagram
Process
Specification
(PSPEC)
Data
Dictionary
State
Transition
Diagram
(STD)
Control
Specification
(CSPEC)
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
9/26
Data dictionary
Representasi Simbol :
=
: composed of
+
: and
{}
: iterations of
[….|…]
: selection / or
()
: optional
“ “
: literal
* *
: comment/description
Vend product (partly) :
Name
Element
Type
object
[coin | slug](product)
data
product
[ice cream | coffee | candy]
data
coins
0{[quarter | nickel | dime]}8
data
product available
[TRUE | FALSE]
control
[“YES” | “NO”]
quarter
*25 cents US currency*
coin return request
[TRUE | FALSE]
control
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
10/26
Data model – ER diagram
Entitas (atribut dan nilai atribut)
Modalitas : tingkat mandatory (minimal)
Kardinalitas : tingkat relasi (maksimal)
Bentuk relasi
Manufacturer
Builds
Car
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
11/26
Data model – data object description
Data object
– represents a composite information
– consists of a number of different attributes or
properties
– encapsulates data only no operation applied to its
data
– can be external entity, thing, occurrence/event, role,
organizational unit, structure, etc.
– e.g. dimensions (height, weight, depth), cars (make,
model, ID, body type, color, owner)
– can be represented in a tabular representation
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
12/26
Process model – DFD
Useful for analyzing existing as well as proposed
systems process decomposition
Focus on the movement of data between external
entities and processes, and between processes
and data stores
A relatively simple technique to learn and use
Model elements: terminator, process, data flow,
control flow, storage, control bar
The highest level (0) Context diagram
– Single process
– Terminators
– Data flows, control flows
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
13/26
Process model – Elemen2 DFD
Terminator
– Representasi entitas eksternal
– Notasi: persegi panjang
– Tidak memproses data
Customer
Data flow
–
–
–
–
Representasi aliran data
data
Notasi: anak panah penuh
Umumnya satu arah
Hubungkan terminator, process dan storage
Control flow
– Representasi aliran kontrol proses
control
– Notasi: anak panah putus2
– Hubungkan terminator, process dan control bar
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
14/26
Process model – Elemen2 DFD (1)
Process
– Representasi aktifitas sistem
– Notasi: lingkaran
– Memproses data
1
Proses A
Storage
– Representasi tempat penyimpanan data
– Notasi: dua garis paralel
– Data flow in = diubah, data flow out = dibaca
data X
Control bar
– Representasi spesifikasi kontrol
– Notasi: garis tegak
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
15/26
Process model – Panduan DFD
Jumlah proses dalam satu diagram DFD : 4 + 2
Maks. 4 level dekomposisi (DFD/CFD)
Dekomposisi fungsional (DFD) :
– fungsi-fungsi yang saling berhubungan dikelompokkan
– fungsi-fungsi yang tidak berhubungan dipisahkan
– setiap fungsi dispesifikasi hanya sekali
Data flow membawa informasi yg diperlukan oleh sebuah
proses untuk transformasi, control flow membawa informasi
yang harus diinterpretasikan untuk merubah perilaku sistem
dan/ aktifasi proses
Proses pemodelan DFD/CFD adalah proses iterasi, tidak
sekali jadi
Penjenjangan CFD harus sesuai dengan DFD
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
16/26
Data – control identification
Identify data first rather than control to know
what you are controlling first
Continuous signals, and processes that act on
them, are always categorized as data
Discrete signals, and processes that act on them,
are usually categorized as control
Terms like activate, turn on, engage and execute
are usually associated with control requirements
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
17/26
Process model – DFD/CFD leveling
Must be consistent
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
18/26
Data/Control Context Diagram (DCD/CCD)
object
returned coins
0*
Customer
customer
selection
slug
coin return
request
Vend
product
Customer
product
product
available
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
19/26
Data/Control Flow Diagram (DFD/CFD level 1)
object
slug
coins
1*
Get
customer
payment
5*
Dispense
change
payment
2p
Get
product
price
returned coins
change due
sufficient
payment
coin detected
price table
coin return
request
price
3p
Validate
payment
valid selection
customer
selection
product
available
4p
Get valid
selection
product
6p
Dispense
product
product
dispensed
valid selection
product
available
products
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
20/26
Data/Control Flow Diagram (DFD/CFD level 2)
DFD/CFD level 2 : Dispense change
coin return
request
product
available
change due
5.1p
Get change
coin
returned coins
change coins
coins
payment
5.2p
Get
payment
coin
payment coins
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
21/26
Process model – Process specification
PSPEC – Validate payment (Process 3)
Inputs
:
payment (data in)
price (data in)
Outputs
:
change due (data out)
sufficient payment (control out)
Body
:
IF payment >= price THEN
change due = payment – price
sufficient payment = TRUE
ELSE
change due = 0
sufficient payment = FALSE
END IF
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
22/26
Behavior model
State Transition Diagram (STD)
initial
accept new coin
Waiting for a
coin
payment returned
accept new coin
coin detected
product dispensed
accept new coin
accept customer
request
Waiting for
selection
coin return request
return payment
sufficient payment
product
available=FALSE
dispense product
return payment
Returning
payment
Dispensing
product
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
23/26
Behavior model (1)
CSPEC – Dispense change : Process Activation Table
coin return
request
product
available
get change
coin
get
payment
coin
TRUE
TRUE
1
0
D/C
FALSE
0
1
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
24/26
Latihan DFD
Buat DFD untuk mesin ATM
–
–
–
–
Mulai dari diagram konteks
Identifikasi aliran data dan kontrol
Identifikasi proses2 utama
Dekomposisi proses
Buat STD untuk mesin ATM
– Identifikasi state-state yang ada
– Identifikasi transisinya
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
25/26
Summary
Pemodelan kebutuhan diperlukan untuk
meningkatkan pemahaman terhadap kebutuhan
yang sedang dianalisis
Pemodelan terstruktur meliputi pemodelan data,
proses dan perilaku dari sistem yang sedang
dikembangkan
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
26/26
SISTEM (APS)
Pemodelan Kebutuhan:
Pendekatan Terstruktur
Tujuan perkuliahan
Memahami pemodelan yang dibutuhkan dalam
rekayasa kebutuhan
Memahami konsep pendekatan terstruktur dalam
pemodelan kebutuhan
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
2/26
Agenda
Konsep pemodelan kebutuhan
Konsep pemodelan terstruktur
Elemen-elemen pemodelan terstruktur
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
3/26
Konsep pemodelan kebutuhan
Model kebutuhan menjembatani antara deskripsi
sistem secara umum dengan model perancangan
Tujuan utama model kebutuhan:
– Menjelaskan apa yang dibutuhkan oleh customer
– Menjadi dasar bagi perancangan PL
– Menjadi referensi dalam melakukan validasi
kebutuhan
Metode: terstruktur & berorientasi objek
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
4/26
Prinsip pemodelan kebutuhan
Model yang dibuat harus fokus pada kebutuhan yang
relevan dengan domain permasalahan WHAT
Setiap model kebutuhan harus bisa dilacak ke model
perancangan traceability
Setiap elemen dalam model kebutuhan harus
mampu memperjelas pemahaman secara utuh
terhadap kebutuhan PL domain masalah,
fungsionalitas dan perilaku sistem
Minimalisasi kopling antar klas/modul
Pastikan bahwa model kebutuhan memiliki nilai
manfaat untuk seluruh stakeholders
Model dibuat sesederhana mungkin notasi yang
sederhana, non duplikasi informasi
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
5/26
Tipe-tipe model kebutuhan
Scenario-based models
– Berdasarkan sudut pandang aktor
Data models
– Menjelaskan domain informasi dari masalah
Class-oriented models
– Merepresentasikan klas-klas yang relevan dengan
kebutuhan PL
Flow-oriented models
– Merepresentasikan proses dan data dari sistem
Behavioral models
– Merepresentasikan perilaku sistem berdasar event
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
6/26
Pemodelan Terstruktur
Konsep
Pertama kali dipopulerkan oleh T. DeMarco
(1979) Structured Analysis and System
Specification
Perluasan notasi untuk kebutuhan real-time
systems oleh Hatley dan Pirbhai (1987) – SA/RT
Strategies for Real-Time System Specification
Processes
Data
Behavior
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
8/26
Elemen-elemen pemodelan
Data Object
Description
Data Flow
Diagram
(DFD)
ER Diagram
Process
Specification
(PSPEC)
Data
Dictionary
State
Transition
Diagram
(STD)
Control
Specification
(CSPEC)
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
9/26
Data dictionary
Representasi Simbol :
=
: composed of
+
: and
{}
: iterations of
[….|…]
: selection / or
()
: optional
“ “
: literal
* *
: comment/description
Vend product (partly) :
Name
Element
Type
object
[coin | slug](product)
data
product
[ice cream | coffee | candy]
data
coins
0{[quarter | nickel | dime]}8
data
product available
[TRUE | FALSE]
control
[“YES” | “NO”]
quarter
*25 cents US currency*
coin return request
[TRUE | FALSE]
control
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
10/26
Data model – ER diagram
Entitas (atribut dan nilai atribut)
Modalitas : tingkat mandatory (minimal)
Kardinalitas : tingkat relasi (maksimal)
Bentuk relasi
Manufacturer
Builds
Car
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
11/26
Data model – data object description
Data object
– represents a composite information
– consists of a number of different attributes or
properties
– encapsulates data only no operation applied to its
data
– can be external entity, thing, occurrence/event, role,
organizational unit, structure, etc.
– e.g. dimensions (height, weight, depth), cars (make,
model, ID, body type, color, owner)
– can be represented in a tabular representation
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
12/26
Process model – DFD
Useful for analyzing existing as well as proposed
systems process decomposition
Focus on the movement of data between external
entities and processes, and between processes
and data stores
A relatively simple technique to learn and use
Model elements: terminator, process, data flow,
control flow, storage, control bar
The highest level (0) Context diagram
– Single process
– Terminators
– Data flows, control flows
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
13/26
Process model – Elemen2 DFD
Terminator
– Representasi entitas eksternal
– Notasi: persegi panjang
– Tidak memproses data
Customer
Data flow
–
–
–
–
Representasi aliran data
data
Notasi: anak panah penuh
Umumnya satu arah
Hubungkan terminator, process dan storage
Control flow
– Representasi aliran kontrol proses
control
– Notasi: anak panah putus2
– Hubungkan terminator, process dan control bar
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
14/26
Process model – Elemen2 DFD (1)
Process
– Representasi aktifitas sistem
– Notasi: lingkaran
– Memproses data
1
Proses A
Storage
– Representasi tempat penyimpanan data
– Notasi: dua garis paralel
– Data flow in = diubah, data flow out = dibaca
data X
Control bar
– Representasi spesifikasi kontrol
– Notasi: garis tegak
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
15/26
Process model – Panduan DFD
Jumlah proses dalam satu diagram DFD : 4 + 2
Maks. 4 level dekomposisi (DFD/CFD)
Dekomposisi fungsional (DFD) :
– fungsi-fungsi yang saling berhubungan dikelompokkan
– fungsi-fungsi yang tidak berhubungan dipisahkan
– setiap fungsi dispesifikasi hanya sekali
Data flow membawa informasi yg diperlukan oleh sebuah
proses untuk transformasi, control flow membawa informasi
yang harus diinterpretasikan untuk merubah perilaku sistem
dan/ aktifasi proses
Proses pemodelan DFD/CFD adalah proses iterasi, tidak
sekali jadi
Penjenjangan CFD harus sesuai dengan DFD
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
16/26
Data – control identification
Identify data first rather than control to know
what you are controlling first
Continuous signals, and processes that act on
them, are always categorized as data
Discrete signals, and processes that act on them,
are usually categorized as control
Terms like activate, turn on, engage and execute
are usually associated with control requirements
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
17/26
Process model – DFD/CFD leveling
Must be consistent
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
18/26
Data/Control Context Diagram (DCD/CCD)
object
returned coins
0*
Customer
customer
selection
slug
coin return
request
Vend
product
Customer
product
product
available
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
19/26
Data/Control Flow Diagram (DFD/CFD level 1)
object
slug
coins
1*
Get
customer
payment
5*
Dispense
change
payment
2p
Get
product
price
returned coins
change due
sufficient
payment
coin detected
price table
coin return
request
price
3p
Validate
payment
valid selection
customer
selection
product
available
4p
Get valid
selection
product
6p
Dispense
product
product
dispensed
valid selection
product
available
products
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
20/26
Data/Control Flow Diagram (DFD/CFD level 2)
DFD/CFD level 2 : Dispense change
coin return
request
product
available
change due
5.1p
Get change
coin
returned coins
change coins
coins
payment
5.2p
Get
payment
coin
payment coins
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
21/26
Process model – Process specification
PSPEC – Validate payment (Process 3)
Inputs
:
payment (data in)
price (data in)
Outputs
:
change due (data out)
sufficient payment (control out)
Body
:
IF payment >= price THEN
change due = payment – price
sufficient payment = TRUE
ELSE
change due = 0
sufficient payment = FALSE
END IF
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
22/26
Behavior model
State Transition Diagram (STD)
initial
accept new coin
Waiting for a
coin
payment returned
accept new coin
coin detected
product dispensed
accept new coin
accept customer
request
Waiting for
selection
coin return request
return payment
sufficient payment
product
available=FALSE
dispense product
return payment
Returning
payment
Dispensing
product
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
23/26
Behavior model (1)
CSPEC – Dispense change : Process Activation Table
coin return
request
product
available
get change
coin
get
payment
coin
TRUE
TRUE
1
0
D/C
FALSE
0
1
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
24/26
Latihan DFD
Buat DFD untuk mesin ATM
–
–
–
–
Mulai dari diagram konteks
Identifikasi aliran data dan kontrol
Identifikasi proses2 utama
Dekomposisi proses
Buat STD untuk mesin ATM
– Identifikasi state-state yang ada
– Identifikasi transisinya
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
25/26
Summary
Pemodelan kebutuhan diperlukan untuk
meningkatkan pemahaman terhadap kebutuhan
yang sedang dianalisis
Pemodelan terstruktur meliputi pemodelan data,
proses dan perilaku dari sistem yang sedang
dikembangkan
Bahan Kuliah APS - Pemodelan Kebutuhan: Terstruktur | Tri A. Kurniawan, S.T, M.T, Ph.D
26/26