LUNAK (RPL)
Perancangan PL Pemodelan
Tujuan perkuliahan
Memahami pendekatan terstruktur
Memahami pendekatan berorientasi objek
2/32
Agenda
Pemodelan pendekatan terstruktur
Pemodelan pendekatan berorientasi objek
3/32
Metode
Functional Design
Berorientasi pada fungsi
Structured Design (Constantin & Yourdon, 1979),
Step wise Refinement (Wirth, 1971, 1976), Jackson
Structured Programming (Jackson, 1975), dll.
Object-oriented Design
Berorientasi pada objek/data
Booch (1994), Meyer (1988), Jacobson et all (1993),
dll.
4/32
Pemodelan Terstruktur
(Functional Design)
6/32
incoming
flow
e
d
c
transform
center
f
g
outgoing
flow
Transaction flow :
b
transaction
center
transaction
action path
g
7/32
Transform Mapping
Langkah-langkah Transform Mapping :
Review dan refine DFD sampai ke level paling bawah
Tentukan apakah DFD tsb. memiliki karakteristik tipe
transform flow atau transaction flow
Tentukan batas antara incoming flow, transform
center dan outgoing flow
Bangun first level factoring
Bangun second level factoring
Refine first iteration
8/32
user commands
and data
1*
Interact
with user
configuration
data
2*
Configure
system
configure
request
start stop
password
configuration
data
configuration
data
3
Activate
/deactivate
sytem
A/D msg.
5*
Process
password
configuration
information
valid ID msg.
4
Display
messages
and status
display
information
sensor
information
Sensors
sensor status
6*
Monitor
sensors
Control
panel
display
Alarm
alarm type
Telephone
line
9/32
configuration
data
6.1
Read
sensors
sensor
information
6.4
Generate
alarm
signal
alarm type
alarm data
telephone
number
sensor status
6.5*
Dial phone
telephone number
tones
10/32
formated ID,
type, location
6
Format
display
configuration
data
sensor
information
9
Generate
display
telephone number
tones
sensor status
sensor ID, type,
location
1
Read
sensors
sensor ID, type
2
Acquire
response
info
alarm cond.
code, sensor ID,
timing
information
7
Generate
alarm
signal
alarm type
8
Generate
pulses to
line
alarm data
3
Establish
alarm
conditions
list of
numbers
4
Select
phone
number
telephone
number
5
Set up
conn. to
phone net
tone ready
telephone
number
11/32
7
3
4
5
Monitor
sensors
executive
Sensor input
controller
Alarm conditions
controller
Alarm output
controller
12/32
Sensor input
controller
Acquire
response info
Read
sensors
Alarm conditions
controller
Establish alarm
conditions
Select phone
number
Alarm output
controller
Format
display
Generate
display
Generate
alarm signal
Set up conn.
to phone net
Generate
pulses to line
13/32
Acquire
response info
Read
sensors
Establish alarm
conditions
Alarm output
controller
Produce
display
Generate
alarm signal
Set up conn.
to phone net
Generate
pulses to line
14/32
Transaction Mapping
Langkah-langkah Transaction Mapping :
Review dan refine DFD sampai ke level paling bawah
Tentukan apakah DFD tsb. memiliki karakteristik tipe
transform flow atau transaction flow
Tentukan batas antara incoming path/transaction,
transaction center dan action path
Bangun first level factoring
Bangun second level factoring
Refine first iteration
15/32
Transaction Mapping
Transaction structuring
Transaction
control
a
Reception
path
Dispatcher
c1
a
q
d
p
p
q
r
s
16/32
configure
request
command
type
2
Invoke
command
processing
8
Build
configurat
ion file
configuration
data
configuration
information
start stop
password
3
Read
password
7
Read
system
data
raw
configuration
data
5
Activate/d
eactivate
system
configuration
data
A/D msg.
four digits
4
Compare
password
w/ file
valid ID msg.
configuration
data
6
Display
message
& status
display
information
17/32
Read
user
command
Read system
data
Invoke
command
processing
System
configuration
controller
Activate
/deactivate
system
Password
processing
controller
Build
configuration file
Display
messages &
status
Read
password
Compare
password w/
file
18/32
Read
user
command
Read system
data
Acquire
response info
Invoke
command
processing
Establish alarm
conditions
Produce
display
Read
sensors
System
configuration
controller
Activate
/deactivate
system
Password
processing
controller
Build
configuration file
Display
messages &
status
Read
password
Alarm output
controller
Generate
alarm signal
Set up conn.
to phone net
Generate
pulses to line
Compare
password w/
file
19/32
Latihan
20/32
22/32
Konsep
Metode untuk melakukan dekomposisi arsitektur
sistem berdasarkan objek-objek yang dimanipulasi
oleh sistem yang sedang dibangun
Identifikasi dan mendefinisikan klas-klas tambahan
yg merefleksikan implementasi dari kebutuhankebutuhan hasil analisis
Notasi = OOA
Proses :
Perancangan sistem : struktur klas, user interface, data
management
Perancangan objek : atribut/struktur data, algoritma operasi
RPL - Perancangan PL - Pemodelan / Tri A. Kurniawan, S.T, M.T, Ph.D
23/32
Struktur klas
Gunakan klas-klas hasil analisis dan tambahkan
sesuai dengan kebutuhan perancangan
Reuse jika memungkinkan
Model dari OOA
Vehicle
VIN
c olor
s tyle
y ear
make
Model OTS
VehicleOTS
VehicleOTS
VIN
VIN
validateVIN()
validateVIN()
validat eVIN()
Vehicle
color
style
year
make
24/32
Package diagram
25/32
Finding classes
Identifying object classes is often a difficult part of
object oriented design
There is no 'magic formula' for object
identification. It relies on the skill, experience and
domain knowledge of system designers.
Object identification is an iterative process. You
are unlikely to get it right first time.
Use domain analysis as before
Use a grammatical approach based on a natural
language description of the system
Base the identification on tangible things in the
application domain
RPL - Perancangan PL - Pemodelan / Tri A. Kurniawan, S.T, M.T, Ph.D
26/32
Finding classes
Derive them from the use cases
(descriptions/scenarios)
Look for data which must be stored or analysed
Are there external systems?
Are there any devices under the control of the
system?
Are there any organisational parts?
27/32
Object Design
Attributes
Describe the state and characteristics of the object
Must be typed : primitive or class
Only name and type are mandatory
Operations
Operations manipulate attributes and perform other
tasks
Scope is the class
Operation signature is composed of name,
parameters and return type
RPL - Perancangan PL - Pemodelan / Tri A. Kurniawan, S.T, M.T, Ph.D
28/32
Object Design
Sifat akses atribut dan operasi/service :
private (klas/objek ybs.)
protected (klas/objek ybs. dan turunannya)
public (semua klas/objek)
29/32
Operations polymorphism
Polymorphism means many (poly) shapes
(morph)
There are two kinds of polymorphism:
Overloading
Two or more methods with different signatures with the
same name
They essentially do the same thing, e.g. class constructors
Overriding
Replacing an inherited method class with another having
the same signature (no matter with different parameters
name)
Do different thing using the same methods signature
RPL - Perancangan PL - Pemodelan / Tri A. Kurniawan, S.T, M.T, Ph.D
30/32
Latihan
A weather station is a package of software controlled instruments
which collects data, performs some data processing and transmits
this data for further processing. The instruments include air and
ground thermometers, an anemometer, a wind vane, a barometer
and a rain gauge. Data is collected periodically.
When a command is issued to transmit the weather data, the
weather station processes and summarises the collected data. The
summarised data is transmitted to the mapping computer when a
request is received.
31/32
Penutup
Pemodelan perancangan dilakukan berdasarkan
hasil pemodelan analisis kebutuhan (RE
modeling)
Transform dan transaction mapping digunakan
untuk membangun arsitektur PL berdasarkan
DFD
OOD dilakukan berdasarkan hasil OOA dengan
perluasan klas jika diperlukan untuk keperluan
implementasi
32/32