Use$Case$ - gt;an$Use$Case$ •...

download Use$Case$ - gt;an$Use$Case$ • Ivar$Jacobson$(1990Jan)$:$“A$use$case$is$a speciï¬c$way$of$using$the$systemby$

of 26

  • date post

    25-Mar-2019
  • Category

    Documents

  • view

    215
  • download

    0

Embed Size (px)

Transcript of Use$Case$ - gt;an$Use$Case$ •...

Use Case

UML

Bahasa pemodelan visual sistem berorientasi objek

Yang dibahaas dalam kuliah ini: Use Case Ac>vty Diagram Class Diagram Sequence Diagram

Penger>an Use Case

Ivar Jacobson (1990-an) : A use case is a specific way of using the system by performing some part of the func>onality. Each use case cons>tutes a complete course of events ini>ated by an actor, and it specifies the interac>on that takes place between an actor and the system... The collected use cases specify all the exis>ng ways of using the system.

Penger>an Use Case

Grady Booch: If you design a new house and you are reasoning about how you and your family will use it, this is use case-based analysis. You consider the various ways in which youll use the house, and these use cases drive the design

Penger>an Use Case

Menggambarkan interaksi antara user/aktor dengan sistem

Jadi, Use Case akan menggambarkan bagaimana sistem akan digunakan oleh user

Fokus dari Use Case adalah fitur/fungsionalitas apa saja yang harus disediakan oleh sistem dan siapa user/aktor yang akan menggunakan fitur/fungsionalitas tersebut

User/Aktor

En>tas eksternal yang berinteraksi dengan sistem Manusia Sistem lain

Tujuan Use Case

Memodelkan kebutuhan fungsional sistem Menunjukkan konteks dari sistem Dapat digunakan sebagai acuan untuk melakukan pengujian validasi

Simbol Use Case

Aktor

Use Case

actor

use case

Asosiasi

Boundary Sistem

Contoh

student

register for course

works with course

lecturer

adm

lab

instructor

make/edit course

register for exam

register as student

System Boundary

Macam-Macam Relasi Aktor dengan Usse Case

actor

use case

Both actor and use case can ini2ate the communica2on.

actor

use case

The actor ini2ate the communica2on.

actor

use case

The use case ini2ate the communica2on.

Relasi dalam Use Case

Generalisasi Include Extend

Use Case: Include

Terdapat 2 usecase (misal A dan B) dimana salah satu use case (A) memiliki ketergantungan dengan satu use case yang lain (B).

Jika use case A dijalankan, maka selalu use case B juga berperan

Use Case: Include

Student register for course, main flow of event: The use case starts when the student brows the course register page.

The user write user name and password. Inclusion point: Validate student The system presents all possible courses for this student. The student select course and commits the entry by pressing the Enter bu[on.

Validate student

Register for course

include

base

Use Case: Include

student

validate student for study

register as

student

enter student in student register

adm

make student profile

include include

include

Use Case: Include

Relasi include ditandai dg stereotype: include

Use Case: Extend

Terdapat 2 usecase (misal A dan B) dimana salah satu use case (A) memiliki ketergantungan secara opsional dengan satu use case yang lain (B).

Misal, jika use case A dijalankan, maka bisa jadi use case B juga jalan, atau mungkin juga use case B >dak ikut jalan (opsional)

Use Case: Extend

Pada relasi extend, dalam use case Buy Goods kita menentukan suatu kondisi kapan use case Buyer returns goods akan dijalankan kapan >dak

Buy Goods

Buyer returns goods

extend

Use Case: Extend

Use Case: Generalisasi

Biasanya digunakan untuk menggambarkan suatu aktor yang merupakan turunan (inherit) dari aktor yang lain

Juga bisa digunakan untuk menggambarkan suatu use case yang menurun dari use case lain. Atau menunjukan dua use case yang memiliki relasi umum-khusus

guest

member

Skenario Use Case/Narasi Use Case

Memberikan uraian secara mendetail dari suatu use case

Tiap use case dibuatkan skenario use case

Use Case Example [1] - Use Case: 5 Buy Goods

CHARACTERISTIC INFORMATION Goal in Context: Buyer issues request directly to our company, expects goods shipped and to be billed. Precondi>ons: We know Buyer, their address, etc. Success End Condi>on: Buyer has goods, we have money for the goods. Failed End Condi>on: We have not sent the goods, Buyer has not spent the money. Primary Actor: Buyer, any agent (or computer) ac>ng for the customer Trigger: purchase request comes in.

Buyer

Buy Goods

Company is out of one of the items

Buyer pays directly with credit card

Buyer returns goods

extend

extend

extend S>muli

Buyer

Buy Goods

Company is out of one of the items

Buyer pays directly with credit card

Buyer returns goods

extend

extend

extend

Use Case: 5 Buy Goods ---------------------------------------- MAIN SUCCESS SCENARIO 1. Buyer calls in with a purchase request. 2. Company captures buyers name, address, requested goods, etc. 3. Company gives buyer informa>on on goods, prices, delivery dates, etc. 4. Buyer signs for order. 5. Company creates order, ships order to buyer. 6. Company ships invoice to buyer. 7. Buyers pays invoice. ---------------------- EXTENSIONS 3a. Company is out of one of the ordered items:

3a1. Renego>ate order. 4a. Buyer pays directly with credit card:

4a1. Take payment by credit card (use case 44) 7a. Buyer returns goods:

7a. Handle returned goods (use case 105)

Each step take the form A does X, where A is an actor and X is an ac>on. If a use case is included you will find a step that has the form include U, where U is another use case. Extension 3a is execute instead of 3 if condi>on: Company is out of one of the ordered items is fulfilled!