Realisasi Use Case
Nisa’ul Hafidhoh
[email protected]
Review • Analisis Use Case Cara untuk mengumpulkan kebutuhan pengguna untuk sebuah program perangkat lunak baru atau tugas yang harus diselesaikan
• Use Case Menggambarkan aktivitas yang dilakukan oleh pengguna dan respon sistem
• Use Case Diagram Representasi interaksi pengguna dengan sistem dan menggambarkan spesifikasi dari use case 2
Tahap Implementasi Use Case
Use Cases Analysis Design Classes Classes
Source Code
Exec
3
Realisasi Use Case Use Case Model
Design Model <
>
Use Case
Use Case Realization
Sequence Diagrams
Collaboration Diagrams
Skenario Use Case Class Diagrams
4
Skenario Use Case Aksi Aktor Skenario Normal 1. Memilih menu Daftar Mata kuliah
Reaksi Sistem
2. Menampilkan daftar mata kuliah dari basisdata ke layar 3. Menekan tombol navigasi (next, prev)
4. Me-refresh tampilan daftar mata kuliah Skenario Alternatif 1. Memilih menu Daftar Mata Kuliah
• The system displays a list of course offerings.
2. Menampilkan pesan ‘Tidak ada mata kuliah’
• The system retrieves and displays a list of current course offerings from the course catalog legacy database.
5
Kandidat Kelas Analisis • Menentukan kandidat kelas analisis dari deskripsi skenario use case
<>
<>
<>
<<entity>> <<entity>> 6
Kelas Analisis <> <> <> <> System boundary
Use-case behavior coordination
<<entity>> System information
<<entity>>
7
Kelas Boundary • User interface classes • System interface classes • Device interface classes <>
8
Peran Kelas Boundary
Customer
Model interaction between the system and its environment 9
Contoh Kelas Boundary User Interface
Register for Courses
MaintainScheduleForm (from Student Interface)
System Interface
Close Registration
Finance System
FinanceSystem (from Finance System)
Device Interface
Scan Book
BarCodeReader
10
Kelas Entity • Konsep utama dalam PL yang dikembangkan, menunjukkan struktur data lojik
<<entity>>
11
Peran Kelas Entity
Store and manage information in the system 12
Contoh Kelas Entity
Course (from University Artifacts)
CourseOffering (from University Artifacts)
Grade (from University Artifacts)
Student (from University Artifacts)
Professor (from University Artifacts)
Schedule (from University Artifacts)
13
Kelas Control • Koordinasi perilaku dalam use case
<>
14
Peran Kelas Kontrol
Coordinate the use case behavior 15
Contoh Kelas Kontrol
RegistrationController (from Registration)
MaintainProfessorController (from Registration)
CloseRegistrationController (from Registration)
MaintainStudentController (from Registration)
SelectCoursesToTeachController ReportCardController (from Registration) (from Student Evaluation)
16
Contoh Kelas Analisis Student
Register for Courses
Course Catalog System
Use Case Model Analysis Model
MainForm
MaintainScheduleForm
Schedule
RegistrationController
CourseCatalogSystem
17
Collaboration Diagram • Menggambarkan interkasi antar objek yang dihubungkan dengan link berisi pesan Client Object
Link
Supplier Object
:Client 1: PerformResponsibility :Supplier
Message 18
Contoh Collaboration Diagram : Main Form 2: // open schedule form( ) 1: // select maintain schedule( ) 5: // select 4 primary and 2 alternate offerings( )
: Maintain ScheduleForm
: Student 3: // get course offerings( ) 6: // add courses to schedule( ) : CourseCatalog 4: // get course offerings( ) System
: Registration Controller
7: // create with offerings( ) :Schedule 19
Sequence Diagram • Menggambarkan interaksi antar objek dengan urutan kronologis :Supplier
:Client
Client Object
Object Lifeline
Supplier Object Reflexive Message
1: PerformResponsibility
Message
Focus of Control
20
Contoh Sequence Diagram : Student
: MainForm
: Maintain ScheduleForm
: Registration Controller
: CourseCatalog System
: Schedule
1: // select maintain schedule( ) 2: // open schedule form( )
3: // get course offerings( ) 4: // get course offerings( ) 5: // select 4 primary and 2 alternate offerings( )
6: // add courses to schedule( ) 7: // create with offerings( )
21
Atribut Kelas • Atribut untuk menyimpan informasi
<<entity>>
CourseOffering
<<stereotype>>
ClassName
number :String=“100” startTime : Time endTime: Time days: enum
Attribute : Type = InitValue Attribute : Type = InitValue Attribute : Type = InitValue
attribute
22
Asosiasi Kelas <> MaintainScheduleForm
<> MainForm // select maintain schedule()
1
0..1
+ // open() + // select 4 primary and 2 alternate offerings() 1 1
<> CourseCatalogSystem // get course offerings()
1
0..*
<> RegistrationController // add courses to schedule() // get course offerings () 0..1
1 <<entity>> Schedule // create with offerings()
23
Tugas • Bentuk 4-5 orang • Tentukan perangkat lunak yang akan dirancang • Susun SKPL
24
TERIMA KASIH
25