Upload
ryosuke-aditya-luky
View
218
Download
0
Embed Size (px)
DESCRIPTION
UML (Unified Modelling Language)
Citation preview
UML Use case modelling
Agenda
• Use-case modelling• Use-case symbols
Functional View of System
• Use-case analysis is a technique to capture business process from user’s perspective
• Roots in object-oriented modeling.
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 ?????
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
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
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 >>
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.
Actors •
Bagi an Pengajaran
Bagian Keuangan
Maintain curriculumMaintain schedule
Dosen
Request course roster M ahasiswa
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
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.
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.
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
Extends & Include
Ambil Uang
Ceta
k Nasabah
Lihat Saldo
include
extend
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.
Other Relationship
<< depends on >>
Mengambil tabungan
Membuka rekening tabungan
Menabung <<depends on>>
<<depends on>>
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
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
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
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
Narrative Use-case Specifications
Use CaseActorsPreconditionsDescription 1.
2.3.4.5.6.7.
Extension
Exceptions
Result
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.
Organizing Use-Case
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
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
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
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
evolutions
Becomes ...
Driver
Mengendarai kendaraan
<<include>>
<<include>>
Driver
Mengendarai kendaraan
Mengerem
berbelok
Evolutions (2)
<<include>>
<<include>>
<<extend>> <<extend>>
Driver
Mengendarai kendaraan
Mengerem
Berbelok
Belok kiri Belok kanan
Sumber:
• Aris Tj., ADSI, ITS