You are on page 1of 18

USE CASE DIAGRAM

Object-Oriented
Modelling Concept
Keuntungan Pemodelan
Berorientasi Objek

• Sangat natural, sesuai dengan cara berpikir manusia


• improve analyst and problem domain expert interaction
• Meningkatkan konsistensi hasil analisis
• abstraksi atribut-operasi dalam sebuah objek
• Konsep penurunan/pewarisan klas memberikan
kemudahan dalam generalisasi objek
• Kemudahan dalam perubahan
• Terjaganya konsistensi model antara analisis dan
perancangan
• Konsep reusability banyak diterapkan
Diagram UML

• Use-case model (statis)


• Activity diagram (statis)
• Sequence/collaboration diagram
(dinamis)
• Class diagram (statis)
• Statechart diagram (dinamis)
Use Case Model
Use Case Model

• A use-case model is a model of the system's


intended functions and its surroundings, and
serves as a contract between the customer and
the developers.
• Use cases serve as a unifying thread
throughout system development. 
• Use-case Model consists of:
• Use Case Diagram
• Use Case Specification
Use Case Model

Use Case Diagram


Use-case diagram

• Menjelaskan perilaku sistem dari tampak luar


• Menyediakan fungsi-fungsi yg harus dipenuhi sistem
sesuai dengan aktornya
• Elemen:
• actor (orang, sistem lain), use-case, system boundary, dan
asosiasi
• Setiap use-case dilengkapi dengan skenario (deskripsi)
• Langkah-langkah:
• Identifikasi aktor
• Identifikasi use-case per aktor
Use Case Diagram
Use Case

• A use case, which associates to an actor, is a complete


flow of events that results in something of value to
the actor.
• Perhaps, a use case could be read as:
<<Actor>> uses system to <<Use Case>>
• Contoh use case yang benar (dalam kasus mesin ATM):
• Melakukan transaksi tarik tunai
• Membayar tagihan kartu kredit
• Contoh yang salah (dalam kasus mesin ATM):
• Memasukkan PIN
• Membatalkan transaksi
Use Case Relationship

• Include
• A use case uses another use case (functional decomposition)
(reuse) and play a mandatory use-case in its flow of events
• 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
Stereotype <<include>> and
<<extend>>
Base
Use Case <<include>>
Supplier
Use Case
Deposit Funds
<<include>>
Customer
Authentication

Withdraw Cash
Customer

Base Supplier
Use Case Use Case
Print Receipt
<<extend>>

Customer Withdraw Cash

yang ditunjuk yang di-include, dan yang ditunjuk yang di-extend


Actor-generalization

• Two/more sub-actors generalized into a super-


actor
• Have both behavior and attributes in common –
described under the super-actor
• Super-actor should interact with use cases when
ALL of its sub-actors interact in the same way
• Sub-actors should interact with use cases when
their individual interactions differ from that of
the super-actor
Actor-generalization

Pay

Customer

Choose Seat
VIP Customer

VIP Customer may act as regular Customer to Pay


but only VIP Customer who may Choose Seat
Directed Arrow and
Undirected Arrow

Order Food
Customer Go-Jek
Driver

• Customer initiates the flow of events of ”Order


Food” use case and Go-Jek Driver is involved
in the flow of events.
• Go-Jek Driver does not and thus can not
initiates the flow of events of “Order Food” use
case.
Two Directed Arrow of a
Use Case

Chat
Customer Go-Jek
Driver

• Customer initiates the flow of events of ”Chat”


use case and Go-Jek Driver is involved in the
flow of events scenario.
• Go-Jek Driver may also initiates the flow of
events of “Chat” use case and involves the
customer in the flow of events scenario.
Use-case diagram

Vending Machine

Insert Object

Customer Select Product

Get Return Coin


Customer Withdraw Money

You might also like