You are on page 1of 26

USE CASE

Bayu Adhi Tama, MTI


bayu@unsri.ac.id

Faculty of Computer Science, University of Sriwijaya

Slides are adapted from Petrus Mursanto (santo@cs.ui.ac.id)


Objectives

 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.
What is use case?

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 kind of services...

 Does ATM provide?

 Does a library information system provide?


Use case and Domain Process

 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.
Identifying Use Case

 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.
Actor
 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
Find Actors

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?
Use Case Diagram

A use case diagram illustrates a set of use cases for a


system, the actors, and the relation between the actors
and use cases.
Point of Sale (POS) Terminal (1)
Assume that we have been requested to create the
software to run a point-of-sale terminal.

POS Terminal system boundary


Point of Sale (POS) Terminal (2)

POS Terminal checkout boundary


Use Case Specification
 UC Specification in ATM System: Withdraw Money
1. 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 Money
5. 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
Example
Use case : Buy Items
Actors : Customer (initiator), Cashier
Description : 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
Naming Use Case

 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
Include UC Relationship
Extend UC Relationship
Library Information System
Library Information System
Undergraduate’s point of view
Library Information System
Postgraduate’s point of view
Library Information System
Lecturer’s point of view
Library Information System
Librarian’s point of view
Library Information System
UC Library Information System
Library Information System
UC Library Information System (REVISED)

You might also like