+ All Categories
Home > Documents > Pertemuan Ke 5 - UML

Pertemuan Ke 5 - UML

Date post: 19-Dec-2015
Category:
Upload: ryosuke-aditya-luky
View: 218 times
Download: 0 times
Share this document with a friend
Description:
UML (Unified Modelling Language)
30
UML Use case modelling
Transcript
Page 1: Pertemuan Ke 5 - UML

UML Use case modelling

Page 2: Pertemuan Ke 5 - UML

Agenda

• Use-case modelling• Use-case symbols

Page 3: Pertemuan Ke 5 - UML

Functional View of System

• Use-case analysis is a technique to capture business process from user’s perspective

• Roots in object-oriented modeling.

Page 4: Pertemuan Ke 5 - UML

Use-case

• Describe what a system does, not how it does it Collectively, Use

Cases represent the functionality required by a system.

• Granularity: fine or coarse ?????

Page 5: Pertemuan Ke 5 - UML

Use-case Modelling

• Use-case diagram – a diagram that depicts the interactions between the system and external systems and users.

• Use-case narrative – a textual description of the business even and how the user will interact with the system to accomplish the task.

Bagian Pengajaran

Dosen

Mahasiswa

Bagian Keuangan

Maintain curriculum

Request course roster

Maintain schedule

Registration System

Page 6: Pertemuan Ke 5 - UML

Use-case symbols

•Use case – subset of the overall system functionality.

•Actor – anything that needs to interact with the system to exchange information.

•System boundary – represents the scope of the system

Use case

Actor

System boundary

Page 7: Pertemuan Ke 5 - UML

Relationship between Use-Case

•Association relationship – link an actor with the use-case(s).

•Include relationship – represents the inclusion of the functionality of one use-case within another.

•Extend relationship – represent the extension of the use case to include optional behavior.

•Generalization relationship – represents a specialized use-case to a more generalized one.

**

<<include>>

<<extend >>

Page 8: Pertemuan Ke 5 - UML

Steps in Creating Use-Case

Olealeo University wants to computerize their registration system:

• Bag Pengajaran sets up the curriculum for a semester• One course may have multiple course offerings.

• Student select 4 primary courses and 2 alternate courses Once a student

registers for a semester, Bagian Keuangan is notified so the student may be

billed for the semester.

• Students may use the system to add/drop courses for a period of time after registration.

• Lecturer use the system to receive their course offering rosters Users of the registration system are

assigned passwords which are used at logon validation.

Page 9: Pertemuan Ke 5 - UML

Actors •

Bagi an Pengajaran

Bagian Keuangan

Maintain curriculumMaintain schedule

Dosen

Request course roster M ahasiswa

Page 10: Pertemuan Ke 5 - UML

Extends (1)

• Use the extends relationship when you have a use case that is similar to another use case but does a bit more.• In this example the basic use case

is “Konsultasi FRS”.• In case certain limits are exceeded

the additional use case “Melebihi batas jumlah SKS” is performed.

<<extend>>

M HSDosen Wal i

Konsul tasi FRS

Mel ebihi batas j uml ah SKS

Page 11: Pertemuan Ke 5 - UML

Extends (2)

• Extensions mean “this use case is similar to that use case with the exception of ...”.

• How do you address case variation?• Capture the simple, normal use case first.

• For every step in that use case ask: “What could go wrong here?”

• Plot all variations as extensions of the given use case.

Page 12: Pertemuan Ke 5 - UML

Uses/Include (1)

• The uses/include relationship occurs when you have a chunk of behavior that is similar across several use cases.

• Use uses/include when you are repeating yourself in two or more separate use cases.

Page 13: Pertemuan Ke 5 - UML

Uses/Include (2)

• Copying the description of that behavior introduces redundance and may lead to inconsistencies when the behavior is changed.

Mengambil Uang

<<use>>

<<use>>

Melihat Saldo

NasabahLogin

Page 14: Pertemuan Ke 5 - UML

Extends & Include

Ambil Uang

Ceta

k Nasabah

Lihat Saldo

include

extend

Page 15: Pertemuan Ke 5 - UML

Extends & Include (2)

• Uses/include and extends imply factoring out common behavior from several use cases to a single use case that is:

• used by several other use cases or • extended by other use cases.

• From the actor’s viewpoint: ??

• Apply the following rules:• Use extends, when you are describing a variation on normal behavior. • Use uses, when you want to split off repeating details in a use case.

Page 16: Pertemuan Ke 5 - UML

Other Relationship

<< depends on >>

Mengambil tabungan

Membuka rekening tabungan

Menabung <<depends on>>

<<depends on>>

Page 17: Pertemuan Ke 5 - UML

Other Relationship (2)

<< include >>• X << includes >> Y indicates that the process of doing X always

involves doing Y at least once

• X must satisfy the pre-conditions of Y before including

<<include>>

X Y

Page 18: Pertemuan Ke 5 - UML

Other Relationship (3)

Generalization

• Used when a number of Use Cases all have some subtasks in common.

• The generalized and specialized use cases must share the same goal.

• A specialized Use Case may capture an alternative scenario of the generalized Use Case.

Specialized

Generalized

Page 19: Pertemuan Ke 5 - UML

Use-case Description

• Generic, step-by-step written description of a use case’s event flow

• Includes interactions between the actor(s) and a use case

• May contain extension points Clear, precise, short descriptions

Page 20: Pertemuan Ke 5 - UML

Example of Use-Case Description

Bermain

• Enter the user name & password

• Check that they are valid

• Rol the dices

• Determine the number of steps

• Move your “halma man”

• Determine the action

• Do the action

Page 21: Pertemuan Ke 5 - UML

Narrative Use-case Specifications

Use CaseActorsPreconditionsDescription 1.

2.3.4.5.6.7.

Extension

Exceptions

Result

Page 22: Pertemuan Ke 5 - UML

Example of Use-Case NarrativeUse Case Mengisi FRS Online

Actors Mahasiswa

Preconditions Mahasiswa sudah bayar SPP

Description 1. FRS Online memerlukan NRP, kode kuliah, dan kelas yang akan diambil

2. Mahasiswa memasukkan data tsb.

3. Extension point: SKS lebih dari jatah

4. FRS Online memeriksa prasyarat dan menghitung total SKS yang diambil. Menampilkan pesan “SKS melebihi jatah” bila pengambilan melebihi jatah yang telah ditentukan.

5. Dosen wali memberikan ACC6. Bagian Administrasi mencetak bukti FRS

7. MHS mengambil bukti FRS

Extension Pengambilan SKS > jatah SKS3a. Bila kelebihan hanya 1 SKS, langsung diijinkan.

3b. Bila track record nilai bagus atau akan DO, diijinkan.

Exceptions MHS tidak jadi mengisi FRS Online.

Result MHS mendapatkan bukti FRS dari bagian Administrasi.

Page 23: Pertemuan Ke 5 - UML

Organizing Use-Case

Page 24: Pertemuan Ke 5 - UML

Generalization

• child use case inherits behavior and meaning of the parent use case.

• child may add or override the parent’s behavior.

• child may substitute any place the parent appears.

Validasi USER

Periksa password

Periksa sidikjari

Periksa retina

Page 25: Pertemuan Ke 5 - UML

Generalization: actors• Generalization can be applied to Actors.

• Note that the MHS can do everything a GUEST can do, but also the MHS can..

L i h a t-l i h a t i n fo rm a si u m u m

G u e st

M e n g i si FRS

M HS

Page 26: Pertemuan Ke 5 - UML

Extends

• The user may see as optional

• Allows to model conditional subflows

• Allows to insert subflows at a certain point, governed by actor interaction

<<extend>>

Bermain

Dua kal i gi l i ran bermain

Page 27: Pertemuan Ke 5 - UML

Example: extension points

Bermain

• Enter the user name & password

• Check that they are valid• extension point: reenter data in case they are invalid

• Rol the dices

• Determine the number of steps

• Move your “halma man”

• Determine the action

• Do the action

Page 28: Pertemuan Ke 5 - UML

evolutions

Becomes ...

Driver

Mengendarai kendaraan

<<include>>

<<include>>

Driver

Mengendarai kendaraan

Mengerem

berbelok

Page 29: Pertemuan Ke 5 - UML

Evolutions (2)

<<include>>

<<include>>

<<extend>> <<extend>>

Driver

Mengendarai kendaraan

Mengerem

Berbelok

Belok kiri Belok kanan

Page 30: Pertemuan Ke 5 - UML

Sumber:

• Aris Tj., ADSI, ITS


Recommended