Pertemuan Ke 5 - UML
-
Upload
ryosuke-aditya-luky -
Category
Documents
-
view
218 -
download
0
description
Transcript of Pertemuan Ke 5 - UML
![Page 1: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/1.jpg)
UML Use case modelling
![Page 2: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/2.jpg)
Agenda
• Use-case modelling• Use-case symbols
![Page 3: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/4.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/5.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/7.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/8.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/9.jpg)
Actors •
Bagi an Pengajaran
Bagian Keuangan
Maintain curriculumMaintain schedule
Dosen
Request course roster M ahasiswa
![Page 10: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/10.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/11.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/12.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/13.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/14.jpg)
Extends & Include
Ambil Uang
Ceta
k Nasabah
Lihat Saldo
include
extend
![Page 15: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/15.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/16.jpg)
Other Relationship
<< depends on >>
Mengambil tabungan
Membuka rekening tabungan
Menabung <<depends on>>
<<depends on>>
![Page 17: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/17.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/18.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/19.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/20.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/21.jpg)
Narrative Use-case Specifications
Use CaseActorsPreconditionsDescription 1.
2.3.4.5.6.7.
Extension
Exceptions
Result
![Page 22: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/22.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/23.jpg)
Organizing Use-Case
![Page 24: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/24.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/25.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/26.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/27.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/28.jpg)
evolutions
Becomes ...
Driver
Mengendarai kendaraan
<<include>>
<<include>>
Driver
Mengendarai kendaraan
Mengerem
berbelok
![Page 29: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/29.jpg)
Evolutions (2)
<<include>>
<<include>>
<<extend>> <<extend>>
Driver
Mengendarai kendaraan
Mengerem
Berbelok
Belok kiri Belok kanan
![Page 30: Pertemuan Ke 5 - UML](https://reader036.fdocuments.in/reader036/viewer/2022062516/55cf8ee3550346703b96b065/html5/thumbnails/30.jpg)
Sumber:
• Aris Tj., ADSI, ITS