analisis dan perancangan sistem...

32
ANALISIS DAN PERANCANGAN SISTEM (APS) Pemodelan Perancangan

Upload: dangthu

Post on 14-Mar-2019

223 views

Category:

Documents


0 download

TRANSCRIPT

ANALISIS DAN PERANCANGAN SISTEM (APS)

Pemodelan Perancangan

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

Tujuan perkuliahan

Memahami pendekatan terstrukturMemahami pendekatan berorientasi objek

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

Agenda

Pemodelan terstrukturPemodelan berorientasi objek

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

Pemodelan Terstruktur(Functional Design)

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

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 7/32

Functional Design Approaches

Transform flow : tipe dasar DFD

Transaction flow :

a

b

cd

fg

e

h

incoming flow

transform center

outgoing flow

a c

b

d e

f

gh

transaction

transaction center

action path

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

Transform Mapping – Contoh

DFD level 1 :

1*Interact

with user

2*Configure

system

3Activate

/deactivate sytem

4Display

messages and status

5*Process

password

6*Monitor sensors

configuration information

user commands and dataControl

panel

Sensors

Control panel

display

Alarm

Telephone line

configure request

configuration data

start stop

password

valid ID msg.

A/D msg.

configuration data

configuration data

sensor status

sensor information

alarm type

telephone number tones

display information

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

Transform Mapping – Contoh

DFD level 2 : Monitor sensors

6.3*Format for

display

6.2*Assess

against setup

6.4Generate

alarm signal

6.1Read

sensors

6.5*Dial phone

configuration information

sensor information

sensor status

sensor ID, type

configuration data

alarm type

telephone number tones

telephone number

alarm data

sensor ID, type, location

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

Transform Mapping – Contoh

DFD level 3 : Monitor sensors

1Read

sensors

configuration information

sensor status

2Acquire response

info3

Establish alarm

conditions

8Generate pulses to

line

4Select phone

number5

Set up conn. to

phone net

9Generate display6

Format display

7Generate

alarm signal

sensor ID, type

configuration data

sensor information

alarm type

telephone number tones

formated ID, type, location

alarm data

alarm cond. code, sensor ID, timing information

list of numbers

telephone number

tone ready telephone number

sensor ID, type, location

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

Transform Mapping – Contoh

First level factoring : Monitor sensorsconfiguration information

8

9

6

7

1

2

3

4

5

Monitor sensors

executive

Sensor input controller

Alarm conditions controller

Alarm output controller

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

Transform Mapping – Contoh

Second level factoring : Monitor sensors

Monitor sensors

executive

Sensor input controller

Alarm conditions controller

Alarm output controller

Format display

Generate alarm signal

Set up conn. to phone net

Generate display

Generate pulses to line

Establish alarm conditions

Select phone number

Acquire response info

Read sensors

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

Transform Mapping – Contoh

Refine first iteration : Monitor sensors

– 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

Monitor sensors

executive

Establish alarm conditions

Alarm output controller

Produce display

Generate alarm signal

Set up conn. to phone net

Generate pulses to line

Acquire response info

Read sensors

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

Transaction Mapping

Transaction structuring

r

s

a

b

d

p

q

Transaction control

b

a

d

c1

q r s

p

DispatcherReception path

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

Transaction Mapping – Contoh

DFD level 2 : User interaction

3Read

password

2Invoke

command processing

4Compare password

w/ file

1Read user command

configuration information

5Activate/deactivate system

6Display message & status

7Read

system data

8Build

configuration file

command type

start stop

user commands and data

configure request

password

raw configuration data

configuration data

A/D msg.

configuration data

configuration data

four digits display informationvalid ID msg.

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

Transaction Mapping – Contoh

First/Second level factoring : User interaction

User interaction executive

Read user command

System configuration

controller

Invoke command processing

Activate /deactivate

system

Password processing controller

Read system data

Build configuration file

Read password

Compare password w/

file

Display messages &

status

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

Transaction Mapping – Contoh

Arsitektur SafeHome Security Software

User interaction executive

Read user command

System configuration

controller

Invoke command processing

Activate /deactivate

system

Password processing controller

Read system data

Build configuration file

Read password

Compare password w/

file

Display messages &

status

SafeHome Security

Monitor sensors

executive

Establish alarm conditions

Alarm output controller

Produce display

Generate alarm signal

Set up conn. to phone net

Generate pulses to line

Acquire response info

Read sensors

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

Latihan

Pemodelan Berorientasi Objek(Object-oriented Design)

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

OOA, OOD, OOP

Object-oriented analysis, design and programming are related but distinctOOA is concerned with developing an object model of the application domainOOD is concerned with developing an object-oriented system model to implement requirementsOOP 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 23/32

Konsep

Metode untuk melakukan dekomposisi arsitektur sistem berdasarkan objek-objek yang dimanipulasi oleh sistem yang sedang dibangunIdentifikasi dan mendefinisikan klas-klas tambahan yg merefleksikan implementasi dari kebutuhan-kebutuhan hasil analisisNotasi = OOAProses :– 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 24/32

Struktur klas

Gunakan klas-klas hasil analisis dan tambahkan sesuai dengan kebutuhan perancanganReuse jika memungkinkan

packaging : pengelompokan klas-klas yg sesuai

Vehiclecolorstyleyearmake

VehicleOTSVIN

validateVIN()

VehicleVINcolors tyleyearmake

validateVIN()

VehicleOTSVIN

validateVIN()

Model dari OOA Model OTS

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

Package diagram

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

Finding classes

Identifying object classes is often a difficult part of object oriented designThere 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 beforeUse a grammatical approach based on a natural language description of the systemBase the identification on tangible things in the application domain

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

Finding classes

Derive them from the use cases (descriptions/scenarios)Look for data which must be stored or analysedAre 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 28/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 29/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 30/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 nameThey essentially do the same thing, e.g. class constructors

– OverridingReplacing an inherited method class with another having the same signature (no matter with different parameter’s name)Do different thing using the same method’s signature

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

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

Penutup

Pemodelan perancangan dilakukan berdasarkan hasil pemodelan analisis kebutuhan (RE modeling)Transform dan transaction mapping digunakan untuk membangun arsitektur PL berdasarkan DFDOOD dilakukan berdasarkan hasil OOA dengan perluasan klas jika diperlukan untuk keperluan implementasi