OO Use Cases (PPT 5-8) Flashcards
What are Use Cases?
A description of a complete sequence of actions, and variants thereof, performed by a system in order to yield a result of value to an actor
What components does a Use Case need?
- Actors: Things outside the system which interact with it
- Use Cases: Functionality provided by the system to meet goals of the actors
Who or what can be an actor?
- Human users
- Other software systems
- Sometimes electro-mechanical systems (this depends on the system, sometimes its not the mechanical system, its what interacts with that)
What are usually not actors?
- The system itself
- Databases
- Computer OS or peripherals (Unless developing drivers or low level applications)
- Automated tasks could be an actor but it depends on the situation
What s the UML representation of an actor?
A stick man
How do we name actors?
- Usually a noun or noun-phrase
- Capture the role they play, not just their position
What should a single use case represent?
- Represent a major piece of functionality
- should be something complete
- deliver something of value to an actor
What does CRUD mean?
Create Retrieve Update Delete If something needs all of these items then it is one use case, not four
What is a secondary actor?
It is an actor which is involved during a use case
What is a Use Case Specification?
It is a description of a complete sequence of actions
What do we need to specify for each use case?
- How it starts
- Basic steps required to fulfil the case
- Any alternate ways of fulfilling it
How do use cases start?
When an actor does something.
What is the basic flow of events?
It is the most common pathway or mian success scenario. Captured as dialogue between actor and system.
How do we identify alternate flows?
Go through basic flow and think of:
- Different decisions that could be made
- Things that could go wrong
- Lack of response from an actor
Why are alternate flows important?
They may raise major design decisions
How do we document alternatives?
Give each one a unique identifier, usually in the form (An) where n is the number of alternate flow. We then give them a descriptive name, a small description and the flow of events
What does include do?
If several use cases share common behaviour, this can be refactored out into a separate use case using include
When should we use include?
- If several use cases share the same piece of behaviour
- If the new use case would contain a reasonable amount of dialogue
What is generalizing a relationship?
This is when one use case inherits all the characteristics of another use case.
What are some common mistakes made with include and extend?
- Overusing both of them
- Trying to force them into somewhere that doesn’t fit
How can use cases be used throughout the life cycle?
- Can help plan and deliver iterations
- Can help with estimating effort
- Can also help with testing and user documentation
How are use cases used at the inception of the life cycle?
- Sketch use cases out and elaborate on riskier ones
- Rank each for risk, business value and architectural significance
- Attack riskiest and most significant first
How are use cases used at the elaboration stage?
- Attack the riskiest and most significant first
- Completely elaborate, analyse, design and implement
How can we estimate effort from use cases?
Can use Use Case Points
- Determine weighting of actors (simple, average, complex)
- Determine weighting of use cases (simple, average, complex)
- Assign amount of hours for UCP
When should we use extend?
When two use cases do the same thing but one does a little more
What does extend do?
It is used to add new, optional behaviour to an already existing use case