use case bayu adhi tama, mti [email protected] faculty of computer science, university of sriwijaya...

26
USE CASE Bayu Adhi Tama, MTI [email protected] Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto ([email protected] )

Upload: aron-beasley

Post on 01-Jan-2016

220 views

Category:

Documents


1 download

TRANSCRIPT

USE CASEBayu Adhi Tama, MTI

[email protected]

Faculty of Computer Science, University of Sriwijaya

Slides are adapted from Petrus Mursanto ([email protected])

To outline the functionality of the system. To define what will be handled by the system

and what will be handled outside the system. To define who and what will interact with the

system. How to create diagrams of the use-case

model. How to create the use-case specification.

Objectives

A use case describes a sequence of actions of a system performs that yields a result of value to a particular actor.

A series of user – system interactions that helps the user to accomplish something.

What is use case?

Does ATM provide?

Does a library information system provide?

What kind of services...

A use case describes a process. A process describes, from start to finish, a

sequence of events, actions, and transactions required to produce or complete something of value to an organization or actor.

e.g. Withdraw cash from an ATM, Register for courses

at school, etc.

Use case and Domain Process

Actor-based: Identify the actors related to a system or

organization. For each actor, identify the process they

initiate or participate in. Event-based:

Identify the external events that a system must respond to.

Relate the events to actors and use cases.

Identifying Use Case

An actor is an entity external to the system who in some way participates in the story of the use case.

There is one initiator actor who generates the starting stimulus, and possibly several other participating actors.

Kind of actors include: roles that people play, computer systems, electrical or mechanical devices

Actor

To find the actors, ask the following questions:Which user groups require help from the system to perform their tasks?Which user groups are needed to execute the system's most obvious main functions?Which user groups are required to perform secondary functions, such as system maintenance and administration?Will the system interact with any external hardware or software system?

Find Actors

A use case diagram illustrates a set of use cases for a system, the actors, and the relation between the actors and use cases.

Use Case Diagram

Assume that we have been requested to create the software to run a point-of-sale terminal.

Point of Sale (POS) Terminal (1)

POS Terminal system boundary

Point of Sale (POS) Terminal (2)

POS Terminal checkout boundary

UC Specification in ATM System: Withdraw Money1. The use case begins when a client inserts

a card into the ATM. The system reads and validates information on the card.

2. The system prompts for a personal identification number (PIN). Client enters the PIN. The system validates the PIN.

3. The system asks which operation the client wishes to perform. Client selects “Withdraw Money”.

4. The system requests the amount of withdrawal. Client enters amount.

Use Case Specification

UC Specification in ATM System: Withdraw Money5. The system request the account type. Client selects

the account type (checking, saving, credit). 6. The system communicates with the ATM network to

validate the account ID, PIN, and availability of the amount requested.

7. The system asks the Client whether a receipt is desired. This step is performed only if there is paper available to print the receipt.

8. The system asks the Client to remove the card. Client removes the card.

9. The system dispenses the requested amount of cash.

10.The system prints a receipt, if required, which ends the use case.

Use Case Specification

ExampleUse case : Buy ItemsActors : Customer (initiator), CashierDescription : A Customer arrives at a checkout with items to purchase. The Cashier records

the purchased items and collects payment. On completion,

the Customer leaves with the items.

Use Case Specification

Use Case Specification

Use Case Specification

Name a use case starting with a verb in order to emphasize that it is a process. Buy Items Enter an Order Maintain Customer Profiles

Naming Use Case

Include UC Relationship

Extend UC Relationship

Library Information System

Library Information SystemUndergraduate’s point of view

Library Information SystemPostgraduate’s point of view

Library Information SystemLecturer’s point of view

Library Information SystemLibrarian’s point of view

Library Information SystemUC Library Information System

Library Information SystemUC Library Information System (REVISED)