SISTEM (APS)
Pemodelan Kebutuhan:
Pendekatan Berorientasi Objek
Tujuan perkuliahan
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 2/34
Agenda
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 3/34
Object Oriented Approach
Mulai populer akhir 80an 90an (Booch, Rumbaugh-
OMT, Jacobson-OOSE, Coad+Yourdon, Wirfs-Brock) :
Elisitasi kebutuhan customer
Identifikasi skenario / use-case (use-case diagram)
Identifikasi klas berdasarkan kebutuhan customer
Identifikasi atribut dan operasi setiap klas
Definisi struktur klas (class diagram)
Definisi model relasi antar klas (collaboration/sequence
diagram)
Definisi perpindahan status sistem (statechart diagram)
1996 : UML (Unified Modeling Language) Grady
Booch+James Rumbaugh+Ivar Jacobson
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 4/34
Keuntungan
Objek (Object) :
A concept, abstraction, or thing with crisp boundaries
and meaning for the problem at hand [Rumbaugh]
Benda (tangible & intangible thing)
Contoh : Andi, Eko, Susi (sistem akademik)
Sebuah objek memiliki karakteristik : identity
(identitas-pembeda), state (sekumpulan atribut) &
behaviour (sekumpulan operasi, aksi, servis)
Notasi : Nama Objek
Atribut2
Operasi2
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 6/34
Object, Class Apa Itu ?
Klas (Class) :
A description of one or more objects with a uniform
set of attributes and services, including a description
of how to create new objects in the class [Yourdon]
Gambaran umum (template, blue-print) yang
menjelaskan sekumpulan objek yang memiliki
kesamaan karakteristik (atribut dan operasi)
Merupakan cetakan dari objek
Digunakan untuk menginstansiasi objek yang memiliki
identitas yang berbeda
Contoh : Klas Mahasiswa objek Andi, Eko, Susi
Abstract & concrete class
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 7/34
Object, Class Apa Itu ?
Mahasiswa
- NIM
Instansiasi : - Nama
penciptaan objek - Buat skripsi
- Ujian
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 8/34
Where to look ?
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 9/34
What to look for ? Nouns
Structures
Relasi antar objek generalisasi, agregasi
Other systems
Sistem lain yang berinteraksi dg proposed system
Things or events remembered
Data, status, kejadian yang harus disimpan
Roles played
Identifikasi peran manusia dalam sistem berinteraksi
langsung, tidak berinteraksi tetapi informasinya disimpan
sistem
Sites
Informasi lokasi/posisi yang harus diingat oleh sistem
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 10/34
Identifikasi atribut
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 12/34
Diagram UML
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 13/34
Use-case diagram
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 14/34
Use-case diagram
Ent er object
Select product
Customer
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 15/34
Use-case scenario
Flow of events for the Select product use-case
Actors Customer
Alternative flows 1. If the selected product is not available, the system will display a
message Your selected product is not available.
2. If the selected product is available but there isnt enough
number to order, the system will display a message The
number isnt enough, max. x. X is the existing number of the
product.
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 16/34
Use-case association
Include
A use case uses another use case (functional
decomposition) reuse
A function in the original problem statement is too
complex to be solvable immediately describe the
function as the aggregation of a set of simpler
functions (mandatory)
Extend
A use case extends another use case
The functionality in the original problem statement
needs to be extended
The extended use-case plays an optional use-case
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 17/34
<<include>> and <<extend>>
<<include>>
OpenIncident
ViewMap
Base Use
Case <<include>>
Supplier
AllocateResources
Use Case
Base Use
Case B
Help
A <<extend>>
ReportEmergency
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 18/34
Actor-generalization
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 19/34
Actor-generalization
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 20/34
Class diagram
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 21/34
Association
For real-world objects is there an association
between classes?
Classes A and B are associated if:
An object of class A sends a message to an object of
B
An object of class A creates an instance of class B
An object of class A has an attribute of type B or
collections of objects of type B
An object of class A receives a message with an
argument that is an instance of B (maybe) will it
use that argument?
Does an object of class A need to know about
some object of class B?
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 22/34
Aggregation composition
Aggregation represents a part-whole or part-of
relationship
Aggregation can occur when a class is a collection or
container of other classes, but where the contained
classes do not have a strong life cycle dependency on
the container essentially, if the container is destroyed,
its contents are not
Composition is more specific than aggregation
Composition usually has a strong life cycle dependency
between instances of the container class and instances
of the contained class(es) if the container is
destroyed, normally every instance that it contains is
destroyed as well
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 23/34
Class relationships examples
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 24/34
Class stereotypes
Boundary classes
model the interaction and manage communication
between the computer system and its actors, but dont
directly represent the specific interface object in the
implementation
used to identify the main logical interfaces with users
and other systems (including e.g. other software
packages, printers)
main task is to translate information across system
boundaries
partition the system so that interface is kept separate
from business logic
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 25/34
Class stereotypes
Entity classes
used to model data and behavior of some real life system
concept or entity e.g. member, bank account, order,
employee
these will sometimes require more persistent storage of
information e.g. a students details are ultimately stored as a
student record
Control classes
represent coordination, sequencing, transactions and control of
other objects
glue between boundary elements and entity elements,
describing the logic required to manage the various elements
and their interactions
roughly one per use case
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 26/34
Class stereotypes
<<control>>
<<boundary>> <<boundary>>
Actor 1 Actor 2
<<entity>> <<entity>>
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 27/34
Sequence diagram
: Products :
: Customer : SelectionScreen : SelectionController
DispenserProduct
selectProduct( )
getValidSelection(String)
isProductAvailable(String)
dispenseProduct(String, int)
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 29/34
Statechart diagram
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 30/34
Statechart diagram example
initial
accept new coin
Waiting for a
coin payment returned
accept new coin
coin detected
accept customer coin return request
request return payment
product dispensed
Waiting for Returning
accept new coin
selection payment
product
sufficient payment available=FALSE
dispense product return payment
Dispensing
product
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 31/34
Alat bantu
Structured Analysis :
Aplikasi pengolah model : Visio, dll.
Aplikasi pengolah kata : MS Word, dll.
CASE Tool : StP (Software through Picture), PSL/PSA
(Problem Statement Language/Problem Statement
Anaylzer), ILeaf, SPMS, dll.
OO Analysis :
Aplikasi pengolah model : Visio, dll.
Aplikasi pengolah kata : MS Word, dll.
CASE Tool : Rational RequisitePro, Rational Soda for
Word, Rational Rose, ArgoUML, dll.
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 32/34
Dokumentasi
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 33/34
Summary
Bahan Kuliah APS - Pemodelan Kebutuhan: OO | Tri A. Kurniawan, S.T, M.T, Ph.D 34/34