Anda di halaman 1dari 32

ANALISIS DAN PERANCANGAN

SISTEM (APS)

Pemodelan Perancangan
Tujuan perkuliahan

Memahami pendekatan terstruktur


Memahami pendekatan berorientasi objek

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 2/32
Agenda

Pemodelan terstruktur
Pemodelan berorientasi objek

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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.

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 4/32
Pemodelan Terstruktur
(Functional Design)
Functional Design Approaches
Transform Mapping - langkah perancangan untuk tipe DFD
transform flow :
Incoming flow : aliran/jalur informasi eksternal masuk ke sistem untuk
ditransformasikan menjadi informasi internal
Transform center : pusat transformasi di dalam sistem yang akan
mentriger informasi keluar dari sistem
Outgoing flow : aliran/jalur informasi internal keluar dari sistem menjadi
informasi eksternal
Transaction Mapping - langkah perancangan untuk tipe DFD
transaction flow :
Transaction : data tunggal yang mentriger satu atau beberapa aliran
data
Transaction center : penghubung antara aliran-aliran data hasil
pentrigeran dengan data trigernya
Action path : aliran/jalur informasi hasil triger
Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 6/32
Functional Design Approaches

Transform flow : tipe dasar DFD


b

a e
incoming
flow d
c

transform
h
center f
g

outgoing

Transaction flow : flow

transaction b
center
transaction
a c f

action path d e
g
h

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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
Contoh Transform Mapping : SafeHome Security
Software
Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 8/32
Transform Mapping Contoh

DFD level 1 :
user commands configuration
Control 2* data configuration
and data Configure
panel information
system
1*
Interact configure
with user request configuration configuration
data data

start stop 3
password Activate
/deactivate
sytem
A/D msg.
4 display
5* Control
valid ID msg. Display information
Process panel
messages
password display
and status

sensor
Alarm
information
sensor status 6* alarm type
Sensors Monitor
sensors Telephone
telephone number tones line

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 9/32
Transform Mapping Contoh

DFD level 2 : Monitor sensors

6.3* sensor
Format for information
display

configuration
information configuration sensor ID, type,
data location 6.4
Generate alarm type
alarm
6.2*
signal
Assess alarm data
against setup

telephone
6.1 sensor ID, type number
Read
sensors
sensor status
6.5*
Dial phone
telephone number
tones

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 10/32
Transform Mapping Contoh

DFD level 3 : Monitor sensors


sensor
configuration formated ID, information
information type, location 9
Generate
6 display telephone number
configuration Format
tones
data display
sensor status

7
sensor ID, type, alarm type
Generate
location alarm
signal 8
1
Generate
Read 2 alarm data pulses to
sensors Acquire line
response 3
sensor ID, type info Establish
alarm 4 tone ready
alarm cond. conditions Select telephone
code, sensor ID, list of phone 5 number
timing numbers number Set up
information conn. to
telephone phone net
number

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 11/32
Transform Mapping Contoh

First level factoring : Monitor sensors


configuration
information
9
6

2 7

4
5 8

Monitor
sensors
executive

Sensor input Alarm conditions Alarm output


controller controller controller

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 12/32
Transform Mapping Contoh

Second level factoring : Monitor sensors


Monitor
sensors
executive

Sensor input Alarm conditions Alarm output


controller controller controller

Acquire Establish alarm Select phone Format Generate Set up conn. to


response info conditions number display alarm signal phone net

Generate Generate
Read sensors
display pulses to line

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 13/32
Transform Mapping Contoh

Refine first iteration : Monitor sensors


Monitor
sensors
executive

Acquire Establish alarm Alarm output


response info conditions controller

Produce Generate Set up conn. to


Read sensors display alarm signal phone net

Generate
pulses to line

Incoming controller dihapus : data input tunggal, cukup sederhana


Transform controller dihapus dan digabung dalam satu modul : ada
penurunan tingkat kohesifitas
Format display dan generate display digabung : sederhana

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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
Contoh Transaction Mapping : SafeHome Security
Software
Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 15/32
Transaction Mapping

Transaction structuring
Transaction
control
a
Reception
b d Dispatcher
path

b a c1

q r s
d
p
p

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 16/32
Transaction Mapping Contoh

DFD level 2 : User interaction


user commands raw
and data configuration
7 8
data
1 Read Build configuration
configure
Read user system configurat data
request
command data ion file
2
Invoke configuration
command
command information
type
processing
configuration configuration
data data
start stop 5
password Activate/d
eactivate A/D msg. 6
system Display
message
3 & status
Read
password four digits display
information
4 valid ID msg.
Compare
password
w/ file

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 17/32
Transaction Mapping Contoh

First/Second level factoring : User interaction

User
interaction
executive

Invoke
Read user
command
command
processing

System Activate Password


configuration /deactivate processing
controller system controller

Read system Build Display Read Compare


data configuration file messages & password password w/
status file

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 18/32
Transaction Mapping Contoh

Arsitektur SafeHome Security Software


SafeHome
Security
Monitor
sensors
executive

User
interaction Acquire Establish alarm Alarm output
executive response info conditions controller

Invoke Produce Generate Set up conn. to


Read user Read sensors
command display alarm signal phone net
command
processing

Generate
System Activate Password
pulses to line
configuration /deactivate processing
controller system controller

Read system Build Display Read Compare


data configuration file messages & password password w/
status file

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 19/32
Latihan

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 20/32
Pemodelan Berorientasi Objek
(Object-oriented Design)
OOA, OOD, OOP

Object-oriented analysis, design and


programming are related but distinct
OOA is concerned with developing an object
model of the application domain
OOD is concerned with developing an object-
oriented system model to implement requirements
OOP is concerned with realising an OOD using an
OO programming language such as Java or C++

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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 kebutuhan-
kebutuhan hasil analisis
Notasi = OOA
Proses :
Perancangan sistem : struktur klas, user interface, data
management
Perancangan objek : atribut/struktur data, algoritma operasi

Bahan Kuliah APS - Pemodelan Perancangan | 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 Model OTS
Vehicle VehicleOTS VehicleOTS
VIN VIN VIN
c olor
s tyle validateVIN() validateVIN()
y ear
make

validat eVIN()
Vehicle
color
style
year
make

packaging : pengelompokan klas-klas yg sesuai


Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 24/32
Package diagram

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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
Bahan Kuliah APS - Pemodelan Perancangan | 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?

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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

Bahan Kuliah APS - Pemodelan Perancangan | 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)
Algoritma operasi untuk implementasi
spesifikasi dari setiap operasi
operasi manipulasi data (set, delete, get, dll.)
operasi komputasi
operasi pengontrolan

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 30/32
Latihan

Aweatherstationisapackageofsoftwarecontrolledinstruments
whichcollectsdata,performssomedataprocessingandtransmits
thisdataforfurtherprocessing.Theinstrumentsincludeairand
groundthermometers,ananemometer,awindvane,abarometer
andaraingauge.Dataiscollectedperiodically.

Whenacommandisissuedtotransmittheweatherdata,the
weatherstationprocessesandsummarisesthecollecteddata.The
summariseddataistransmittedtothemappingcomputerwhena
requestisreceived.

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 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

Bahan Kuliah APS - Pemodelan Perancangan | Tri A. Kurniawan, S.T, M.T, Ph.D 32/32