Sei sulla pagina 1di 15

1

Unified Modeling Language (UML)


A modeling language is a language whose rules
focus on the conceptual and physical
representation of a system.
Standard Language for
visualizing
specifying
constructing
documenting
Process independent
Notation is well-defined semantics
2
Actors
Actor represents a role that a human, a hardware
device, or even another system plays with a
system.
Actor models external entities of system
Actors interact directly with system
Human user
External data store
External network
External system
Actor initiates actions by system
May use I/O devices or external system to physically
interact with system
Actor initiates use cases
3
Actors
Actors are always external to system
Who uses the system?
Who installs the system?
Who starts the system?
Who maintains the system?
Who shuts down the system?
What other systems use this system?
Who gets information from this system?
Who provides information to the system?
Does anything happen automatically at a preset time?
4
Use Cases
Use Case
Scenario showing interaction between user (actor) and
system
Initially developed in the Inception phase
Shows interaction between actor and black box system
Use cases refined in Elaboration Phase
Show major objects participating in use case
Develop collaboration diagrams or sequence diagrams
Use cases refined further in Construction Phase
Use cases form basis of integration & system test
cases
5
Use Cases
Identifying use cases
Consider each major function an actor needs to perform
Provides value to actor
Use case is a complete sequence of events initiated by
an actor
Specifies interaction between actor and system
Use case starts with input from an actor
Basic path
Most common sequence
Alternative branches
Variants of basic path
E.g., for error handling
6
Use Cases
Identifying use cases
What functions will the actor want from the system?
Does the system store information? What actors will
create, read, update, or delete that information?
Does the system need to notify an actor about changes
in its internal state?
Are there any external events that the system must
know about? What actor informs the system about those
events?
Startup, shutdown, diagnostics, installation, training,
changing a business process.
7
Describing Actors and Use Cases
Each actor and use case needs a brief description
Example of a order processing company
Customer - a person who orders products
Customer rep - an employee who processes customer
requests
Shipping Co. - USPS, UPS, DHL FedEx, etc.
Clerk - an employee who packages, labels, and ships
orders.
Inventory system - software that tracks the company
inventory
Accounting system - software that keeps the company
books.
8
Describing Actors and Use Cases
Place order - a customer creates a new order to request products
and provide payment for those products.
Get catalog - a customer requests a catalog.
Get status on order - a customer gets the status of an existing
order
Return product - a customer returns a product for a refund
Cancel order - a customer cancels an existing order
Register Complaint - a customer sends a message to customer
support
Charge account - charge a customers account
Credit account - credit a customers account
9
Describing Actors and Use Cases
Deliver packages - request a shipping company to deliver
products or our customers
Calculate postage - determine how much postage is needed to
send an order to an customer
Print mailing label - print a mailing label for an order
Get product information - get information about a product
Update product quantities - update the amount of product in
stock
Receive back-ordered item - the processing to be done when
item that are back-ordered have been received
10
Use Case Diagram for Placing Orders
Customer
Customer
Rep
Place
order
Get status
on order
Get
catalog
Cancel
order
Return
product
Register
complaint
11
Use Cases for Filling Orders
Shipping
Company
Inventory
system
Deliver
packages
Calculate
postage
Print mailing
label
Charge
account
Credit
account
Get product
information
Clerk
Accounting
system
Update product
quantities
Receive back-
ordered items
12
Use Case Package
Use Case Package
Encompasses related group of use cases
Represent high level requirements
Use Case Package Structuring
Group use cases into packages based on
Major subset of system functionality
Related use cases started by the same actor
Order placement Order fulfillment
13
Use Case Relationships
Include relationship
Identify common patterns (sequences) in several use
cases
Extract common pattern into abstract use case
Concrete use cases include abstract use case
Example
Withdraw Funds use case includes Validate PIN use
case
14
Use Case Diagram for ATM
ATM
Customer
Withdraw
funds
Query
account
Transfer
funds
Startup
Shutdown
Validate
PIN
Operator
Add
cash
include
include
include
15
Use Case Relationships
Extend relationship
Use case A is an extension of use case B
Under certain conditions use case B will be extended by
description given in use case A
Same use case is extended in different ways
Eliminate duplicate event sequences
When to use extend
Show conditional parts of use case
Model complex or alternative paths

Potrebbero piacerti anche