Examples and Use Cases
•	More about use cases
•	Examples for the Point-of-Sale application
•	Monopoly
More about use cases
•	Use cases as stories -- text, not diagram, is basis
•	Each use case should describe how software will satisfy user goals
•	Use cases include both success and failure scenarios
•	specific cases
•	Should produce observable result
Use cases vs. tradition
•	Tradition
•	Lists of functions and features
•	Does not guarantee link to user goals
•	Use cases
•	Put requirements in context
Use case types
•	Black-box use cases
•	What the system does, not how
•	brief / casual / fully dressed
•	increasing level of detail
Example (brief)
•	Process Sale
•	"A customer arrives at a checkout with items to purchase
•	The cashier uses the POS system to record each purchased item
•	The system presents a running total and line-item details"
Example (brief)
•	Process Sale (cont'd)
•	"The customer enters payment information, which the system validates and records
•	The system updates inventory
•	The customer receives a receipt from the system and then leaves with the items"
Things to note
•	Every sentence starts with either an actor or "The system"
•	Every sentences uses the "active" voice
•	Emphasizes what the actors and software do
•	Clearly assigns responsibility
•	Only one scenario covered -- no "if"s
•	positive result
Example (casual)
•	Handle Returns 
•	"Main success scenario: A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item... "(continue?)
•	Alternate Scenarios describe error handling: ex: "If they paid by credit, and the reimbursement transaction to their credit account is rejected, inform the customer and pay them with cash."
Fully dressed use cases
•	Organized into multiple sections:
•	Preface elements
•	Stakeholders and Interests list (***)
•	Preconditions and postconditions
Fully dressed use cases
•	Main success scenario (basic flow)
•	Extensions (alternate flows)
•	Special requirements
•	Technology and data variations list
Fully dressed -- notes
•	Preface:
•	Ex: Primary actor (for Process Sale, why is this the Cashier? What about the customer?)
•	Other prerequisite concepts
•	Stakeholders
•	Identifying them helps guide what must be included in use case
•	Know who should be interviewed for the product
Fully dressed -- notes
•	Special requirements:
•	Nonfunctional requirements
•	Technology and data variations
•	Hardware/software/data formats that must be supported
•	Early "design", but essential (ex: specified by client)
Monopoly
•	Text's version of problem
•	simulation
•	input = number of players
•	output = results of simulated player turns
•	No useful "story" to tell
•	just start the simulation and watch