Requirements & Use Cases
Before anyone designs a class, someone has to pin down what the system is for. This Part explains why we model at all, how the Unified Process fits modelling into short iterations, how requirements are classified, and then covers use cases in depth: the text, the actors, the levels, the relationships and the diagram. Exam Q2 is a brief-format use case, and this Part ends with a recipe for it.
- You willexplain why software needs design (complexity and change) and how analysis differs from design.
- You willplace the UP phases, disciplines and artefacts on an iterative timeline, and say what inception and elaboration are not.
- You willclassify requirements with FURPS+, and write brief, casual and fully dressed use cases with correctly numbered extensions.
- You willpick the right level with the Boss, EBP and Size tests, and draw a correct use case diagram with «include» and «extend».
Why Model and Design Software? exam
Any program that works on day one can still be a failure a year later, when nobody can understand it well enough to fix or extend it. Design and modelling are the course's answer to that problem. This section gives the course's two definitions, then the two forces every design has to survive: complexity and change.
Purposefully choosing the behaviour and structure of a software system. Behaviour is how the system responds to inputs and events; structure is how its parts collaborate to achieve its goals.
Creating tangible but abstract representations of a system so you can communicate design ideas, critique them and explore alternatives. The result, a model, is a shared artefact.
"Tangible" means you can point at it; "abstract" means it leaves out detail that doesn't matter for the question at hand. Because client and developers can look at the same model, it becomes the place where they build a common understanding of the system before (and while) code is written.
Challenge 1: complexity
Physical parts can only touch their neighbours, but software is abstract, so any component can depend on any other. Nothing physical stops a developer from adding one more dependency, and developers tend to add complexity when nothing stops them. With N components there can be up to
KN = N(N − 1) / 2
The reason is simple counting: each of the N components could depend on each of the other N − 1, and each pair is counted twice (A–B and B–A), so divide by two. Step through the picture to watch the count grow much faster than N itself.
- Two components, C1 and C2: only one possible dependency between them. Easy to understand.
- Add C3. It can depend on both C1 and C2, so two new lines appear (gold): 3 in total.
- Add C4: three new lines, one to each existing component. Total 6.
- Add C5: four new lines, total 10. The N-th component brings N − 1 new possible dependencies.
- Add C6: five new lines, total 15. The picture is already hard to read, and so would the code be.
- Add C7: total 21.
- Add C8: total 28. The growth is quadratic: 10 components give 45, and 50 give 1,225. More dependencies make a system harder to understand, so harder to maintain (fix, update, extend). Good design keeps most of these lines out.
Challenge 2: change
The second force is that requirements change. Larman (ch. 2) reports that about 25% of a typical project's requirements change, and 35–50% on large projects. So a design is judged not just by whether it works today, but by how cheaply it can be changed tomorrow. A design that is hard to change fails over time, even if it works on day one.
AI tools handle small, local tasks well, but they lose the system-wide context, and the more code they generate, the more complexity there is. A good design and a model give the bird's-eye view, so that humans and AI tools work to the same plan.
Larman's framing
Analysis is "do the right thing". Design is "do the thing right". The most important single object-oriented skill is assigning responsibilities to software objects, which the course teaches with GRASP (Part IV).
UML, by contrast, is just notation. Knowing UML is not the same as knowing design: someone who draws fluent UML without design skill simply produces bad designs on paper. Larman also takes an agile modelling view: the main purpose of modelling is to understand and communicate, not to document. So you model the hard parts, sketch them quickly and treat the diagrams as throw-away hints, because only tested code shows the true design.
Check yourselfA system has 6 components. How many pairwise dependencies are possible? What about 20 components, and why does this matter?
K6 = 6 × 5 / 2 = 15. K20 = 20 × 19 / 2 = 190. Tripling-and-a-bit the components multiplied the possible dependencies by more than twelve. Every extra dependency is something a maintainer has to understand before changing code, so unchecked dependencies make the system harder to fix, update and extend.
Check yourself"Our team knows every UML notation by heart, so our designs will be good." What would Larman say?
He would disagree. UML is only a notation; design skill is mainly about assigning responsibilities to objects well. Fluent UML without that skill just records a bad design neatly. Notation matters because models exist to communicate, but object design skill matters more.
- Design chooses behaviour and structure; modelling makes tangible, abstract representations to communicate, critique and explore alternatives.
- Two challenges: complexity (up to N(N − 1)/2 dependencies) and change (25% of requirements typically, 35–50% on large projects).
- Analysis = do the right thing; design = do the thing right. UML is notation, not design skill.
Object-Oriented Analysis vs Design exam
"Analysis" and "design" are such broad words that two people can use them for completely different activities. Larman's fix is to always qualify them: say which kind of analysis or design you mean. Each object-oriented activity is then one kind of the general activity, and each kind produces specific artefacts.
| Activity | Emphasis | Typical question | Artefacts in this course |
|---|---|---|---|
| Analysis (general) | Investigating the problem and requirements, not a solution | What is needed? | (comes from a specific kind, below) |
| ↳ Requirements analysis | What the system must do and how it will be used | What is needed? How will it be used? | Use cases, Supplementary Specification, Glossary (this Part) |
| ↳ OO analysis (OOA) | Finding and describing the objects (concepts) in the problem domain | What are the noteworthy concepts, attributes and associations? | Domain model (static) and system sequence diagrams (dynamic), Part II |
| Design (general) | A conceptual solution that fulfils the requirements, not its implementation | How will we meet the requirements? | (comes from a specific kind, below) |
| ↳ OO design (OOD) | Defining software objects, their responsibilities and how they collaborate | Which object does what, and who talks to whom? | Interaction diagrams and design class diagrams, Part III–IV |
| Implementation (OOP) | Coding the design objects | — | Java classes |
Here is the same idea on a tiny example from Larman (1.4), a flight information system. Watch one name travel through all three activities.
Plane an attribute and a method, deciding what it is responsible for. OOP turns that decision into a Java class.The short form of the distinction is that analysis is the "what" and design is the "how". Use cases themselves are not object-oriented, since they are just stories, but they are the main input to OOA/D.
In the Unified Process, analysis, design, implementation and test are disciplines: kinds of work, not stages of the calendar. Every iteration does a little of each, roughly in that order, and then the loop repeats for the next slice of the system. The UP's phases (Inception, Elaboration, Construction, Transition) are a different thing, and all disciplines happen in every phase; only the mix changes. Only in waterfall are analysis and design sequential phases done once. Section 1.4 draws this.
Bird's-eye example: the Dice Game (Larman 1.5)
Larman's Dice Game runs through the whole pipeline in four artefacts, and it is worth knowing as a map of the course: use case (this Part), domain model (Part II), interaction diagram and design class diagram (Part III). Step through it; each artefact is built from the one before.
- 1. The use case. Requirements first: a brief, one-paragraph story of the goal. The Player asks to roll; the System shows the result; seven wins. No objects yet, just who wants what.
- 2. The domain model (OOA, conceptual perspective). Pick out the noteworthy real-world concepts from the story: Player, Die, DiceGame, with attributes and named associations. There are no methods: this describes the world, not software.
- 3. The interaction diagram (OOD). Now software objects send messages. Notice the gold lines: in the real world the player rolls the dice, but in the software the
:DiceGameobject "rolls" them by sendingroll()to eachDie. Software objects are inspired by the domain; they don't simulate it. - 4. The design class diagram (OOD, static). Read the methods straight off the messages:
DiceGamereceivesplay, so it needsplay();DiereceivesrollandgetFaceValue. The open arrow says a DiceGame can reach its 2 Dice. - Low representational gap. The gold boxes show the same names (DiceGame, Die) in the domain model and in the design. That is deliberate: software that mirrors how people think about the domain is easier to understand. Parts II and III build on this.
Check yourselfName the activity (requirements analysis, OOA, OOD or OOP) for each: (a) noticing that a library has Members, Loans and Books; (b) deciding that a Loan object calculates its own due date; (c) writing "Member borrows a book; System records the loan"; (d) writing class Loan { … }.
(a) OOA: finding concepts in the problem domain. (b) OOD: assigning a responsibility to a software object. (c) Requirements analysis: a use case step. (d) OOP: implementation.
Check yourselfIn the Dice Game domain model, Player rolls Die. Yet in the design, DiceGame sends roll(), and there is no Player.roll(). Is the design wrong?
No. The domain model describes the real world; the design describes software objects that are only inspired by it. The software doesn't have to simulate who does what physically. It only has to assign each responsibility to a sensible object, and DiceGame coordinates the game, so it rolls the dice.
- Qualify the words: requirements analysis and OOA are kinds of analysis (the "what"); OOD is a kind of design (the "how"); OOP is implementation.
- Pipeline: use case → domain model → interaction diagram → design class diagram, with shared names giving a low representational gap.
- In the UP, analysis and design are disciplines done in every iteration, not phases.
UML: Three Uses, Three Perspectives exam
The same UML box can be a whiteboard scribble or a machine-checked specification, and it can stand for a real-world concept or a Java class. Two classifications sort this out: how UML is being used, and what the diagram is describing. Getting the second one wrong is the commonest error in this area of the exam.
The OMG defines UML as "a visual language for specifying, constructing and documenting the artifacts of systems". It is the de facto standard diagramming notation for OO software. It is not a method, and it is not OOA/D: it tells you how to draw, not what to draw.
Three ways to apply UML (Fowler)
Three perspectives: what the boxes mean
The second classification is about meaning. A rectangle labelled Sale might describe a real sale in a shop, or a Java class in a program. UML uses the same notation for both, so the reader needs to know which perspective the diagram takes.
getTotal() are typical NextGen POS examples.)| Perspective | Diagrams describe… | Course example | Larman's term for the boxes |
|---|---|---|---|
| Conceptual | Things in the real world or domain of interest | Domain model / domain class diagram (Part II) | Conceptual class: a real-world concept |
| Specification (software) | Software abstractions and components with interfaces, no commitment to a language or technology | Rarely used in practice | Software class |
| Implementation (software) | Software in a specific technology, e.g. Java | Design class diagram (Part III) | Implementation class: a class in a specific language |
The commonest exam error here is mixing perspectives: drawing a domain model (conceptual) but slipping in software ideas. Compare the two domain-model fragments below.
The course uses these UML diagrams, and the rest of the site covers each one:
Class diagram
As a domain model (conceptual) and as a design class diagram (implementation).Sequence diagram
As a system sequence diagram (SSD) and as a design sequence diagram.Communication diagram
The same interactions as a sequence diagram, drawn as a network.Check yourselfA tool reads a legacy Java codebase and draws class diagrams so a new team member can understand it. Which way of applying UML is this?
UML as blueprint, specifically reverse engineering (code → diagrams). If the tool went the other way and generated code from diagrams, that would be forward engineering, still blueprint use. Only if the diagrams were a complete executable specification, with code never edited by hand, would it be UML as programming language.
Check yourselfYou see a class box Payment with the operation +authorise() : Boolean. Which perspective can this diagram not be taking, and why?
It can't be the conceptual perspective (a domain model). Conceptual classes are real-world concepts and have no methods; visibility markers and return types make it an implementation-perspective box, as in a design class diagram.
- UML is a notation, not a method. Uses: sketch (most valuable), blueprint (reverse/forward engineering), programming language (immature).
- Perspectives: conceptual (domain model, conceptual classes), specification (rare), implementation (DCD, implementation classes).
- Never mix them: no methods or software classes (
SaleDB,ArrayList) in a domain model.
Iterative Development and the Unified Process exam
If requirements change by a third or more during a project, a plan that freezes them on day one is doomed. The course's answer is iterative development, organised by the Unified Process (UP). This section explains how iterations work, what the UP's four phases really are (two are routinely misread), and, from the Week 11 lecture, when in a project modelling and design actually happen.
A software development process describes an approach to building, deploying and possibly maintaining software. The Unified Process is a popular iterative process for OO systems; RUP (Rational Unified Process) is a detailed refinement of it. Larman teaches OOA/D inside an agile UP, and the course uses only its main ideas.
Iterative and evolutionary development
The work is cut into a series of short, fixed-length (timeboxed) mini-projects called iterations, typically 2–6 weeks long. Each iteration has its own requirements, design, implementation and testing, and ends with a tested, integrated, executable partial system. That partial system is production-grade, not a throw-away prototype.
Because the system grows incrementally from one iteration to the next, the approach is called iterative and incremental. Because the specifications and design evolve through feedback and adaptation, it is also called iterative and evolutionary.
Two planning rules shape the iterations. The first is timeboxing: the end date is fixed, so if the work won't fit, you de-scope (move tasks to a later iteration) rather than slip the date.
The second rule is risk-driven and client-driven planning: early iterations tackle the highest risks, especially the core architecture (which is why the UP is called architecture-centric), and the features the client values most.
The benefits follow from this: less project failure, better productivity and fewer defects; early mitigation of high risks; early visible progress; early feedback and user engagement; managed complexity, with no "analysis paralysis"; and a process that itself improves from iteration to iteration.
| Waterfall (sequential) | Iterative and evolutionary | |
|---|---|---|
| Requirements | Defined fully and "frozen" before design and coding | Discovered and refined each iteration. Coding starts when about 10–20% are detailed. |
| Design | Thorough design before programming | A little design (UML sketching) each iteration |
| Attitude to change | Change is resisted | Change is embraced and expected |
| Evidence | Strongly associated with failure: about 45% of waterfall-specified features are never used, and early estimates vary by up to 400% | Associated with higher success, productivity and quality |
The four UP phases
The UP groups its iterations into four phases, always in this order. Two of them are often misread, so pay attention to what inception and elaboration are not.
Inception
An approximate vision, business case, scope and vague estimates, so you can decide whether to continue. Not a requirements phase: a short feasibility step, often about a week. Most use cases are named, about 10% detailed.Elaboration
Refines the vision, iteratively implements the core architecture, resolves high risks, identifies most requirements, makes realistic estimates. Not "the design phase": production code is written. Ends with 80–90% of requirements detailed but only ~10% of the system built.Construction
Iteratively implements the remaining lower-risk, easier elements and prepares for deployment. Mostly implementation, little new requirements work.Transition
Beta tests and deployment: releasing the system into production.Four schedule terms are worth knowing precisely, because MCQs like to swap them.
Disciplines: the work that happens in every phase
A discipline is a set of activities and artefacts in one subject area. In any single iteration work happens in most disciplines, but the relative effort shifts: early iterations are heavier on requirements and design, later ones on implementation. This is the picture to have in your head when someone says "analysis and design are disciplines, not phases".
Every UP artefact is optional except the code. You pick the ones that add value, the way you would pick medicine at a pharmacy rather than swallowing everything on the shelf, and you record the chosen set in the Development Case.
Agile, the agile UP, and common misconceptions
The Agile Manifesto values four things over four others. (The things on the right still have value; the left is valued more.)
| Valued more | over | |
|---|---|---|
| Individuals and interactions | over | processes and tools |
| Working software | over | comprehensive documentation |
| Customer collaboration | over | contract negotiation |
| Responding to change | over | following a plan |
The agile UP applies that spirit to the UP. It uses few artefacts, lets requirements and design emerge over the iterations, and applies UML with agile modelling. For planning it keeps a coarse Phase Plan for the whole project and a detailed Iteration Plan only for the next iteration. Agile modelling means modelling to understand, and modelling only the tricky parts: whiteboards, modelling in pairs, developing the static and dynamic views in parallel, and "good enough" notation. Developers model for themselves rather than handing diagrams off.
- try to define most requirements before starting design or code, or most of the design before coding;
- spend days or weeks in UML before programming;
- think inception = requirements, elaboration = design, construction = coding (that is just waterfall laid over the UP);
- think an iteration should last three months rather than about three weeks;
- try to plan every iteration in detail up front.
When do we model? Inception and elaboration in detail (Week 11)
The Week 11 lecture, Modelling & Design in the Software Process (Larman chs. 4, 8, 12, 14), returns to the UP to answer one question: when, in the development process, do we design and create models? Its recap slide is Larman's sample of UP artefact relationships.
Inception
Inception is the initial short step to establish a common vision and basic scope for the project. It asks: What is the vision and the business case? Is it feasible? Buy, build, or both? Is the rough (admittedly unreliable) cost tens of thousands of dollars or millions? Do the stakeholders basically agree, and is the project worth serious investigation? Proceed or stop? Because the UP is not waterfall, inception is not the time to gather all the requirements or make believable estimates; that happens in elaboration.
By the end of inception you should have a common vision and basic scope, a business case that addresses cost, about 10% of the use cases analysed in detail, an analysis of the critical non-functional requirements, a prepared development environment, perhaps some prototypes, and a go / no-go decision. The starred artefacts below are the must-haves, and every artefact is only started in inception, never finished.
| Artefact | What it holds during inception |
|---|---|
| Vision and Business Case * | High-level goals and constraints, the business case, and an executive summary |
| Use-Case Model * | The functional requirements: names of most use cases, about 10% analysed in detail |
| Supplementary Specification | The other, mostly non-functional, requirements. Some idea of the key ones with a major architectural impact is a must-have * |
| Glossary | Key domain terminology, and the data dictionary |
| Risk List and Risk Management Plan | Business, technical, resource and schedule risks, and ideas for mitigating them |
| Prototypes and proofs-of-concept | To clarify the vision and validate technical ideas |
| Iteration Plan * | What to do in the first elaboration iteration |
| Phase Plan and Software Development Plan | A low-precision guess at elaboration's duration and effort, plus tools, people, education and other resources |
| Development Case | The UP steps and artefacts customised for this project (the UP is always customised) |
- it took more than "a few" weeks;
- you tried to define most of the requirements;
- you expect the estimates or plans to be reliable;
- you defined the architecture;
- you planned requirements → architecture → implementation in sequence;
- you produced no Business Case or Vision;
- you wrote all the use cases in detail;
- you wrote none of the use cases in detail.
Read the last two together: the 10% rule cuts both ways. Inception details a few use cases, not none and not all.
Elaboration
Elaboration is the initial series of iterations for building the core architecture, resolving the high-risk elements, defining most requirements, and estimating the overall schedule and resources. When it ends, three things are true: the core, risky architecture has been programmed and tested (an executable architecture); most requirements are discovered and stabilised (the lecture says about 80% reliably defined); and the major risks are mitigated or retired. It is not a do-the-whole-design phase. The artefacts that may be started in elaboration are the Domain Model, the Design Model, the Software Architecture Document, the Data Model, and use-case storyboards and UI prototypes. So the lecture's answer to its opening question is: design and modelling usually happen in elaboration.
Analyses ~10% of the use cases and ends in a go / no-go decision. Outcome: a common vision and the use case model (use case text + use case diagram), which is this Part.
Discovers and stabilises most requirements, builds the core architecture, analyses high-risk elements, starts the design. Outcome: domain and design models for some requirements (Parts II–VI) and a Software Architecture Document (component diagram, factor table, technical memos).
Asked in the same lecture whether the architecture must always come first, the lecturer said no: the architecture, the domain model and the design model can be developed concurrently over several iterations, because this is not a waterfall in which a finished architecture precedes everything else.
When and how design and modelling happen
The lecture's slogan is iteratively do the right thing, do the thing right. Requirements work is "doing the right thing" (validation); design is "doing the thing right" (verification). An iterative method embraces change, but you should still provoke the inevitable change early, in the first iterations, so requirements discovery settles and the goal becomes stable. None of this takes weeks: use case writing and domain modelling take a few hours or days, mixed into a few weeks that also include proof-of-concept work, finding resources, planning and setting up the environment.
Use cases are spread across iterations, because one use case is often too big to finish in one short iteration. Different parts or scenarios of it go to different iterations:
Developers design objects in one of three ways:
Code
From a mental model straight to code, designing while coding, ideally in an IDE that supports refactoring and other high-level operations.Draw, then code
Draw UML on a whiteboard or in a UML CASE tool, then switch to coding. The rule: the drawing overhead must be worth the effort.Only draw
A tool generates everything from diagrams. A misnomer, since a programming language is still attached to the graphical elements; many tool vendors have failed with it.For the drawing itself, the lecture recommends agile modelling with lightweight UML: model together with other developers; build the static and dynamic models (class and interaction diagrams) in parallel; draw by hand on whiteboards and capture the result digitally, or use a UML tool with IDE integration and reverse or round-trip engineering; and spend a few hours to a day near the start of an iteration (for a three-week iteration). Drawing UML is really making design decisions. Correct notation matters, because a model exists to communicate, but object design skill matters more than UML notation skill, and it rests on responsibility assignment (GRASP, Part IV) and design patterns (Part VI).
Check yourselfHalfway through a three-week iteration, the team realises it can't finish all the planned tasks. What does the UP say to do?
De-scope: move the tasks that won't fit to a later iteration and keep the end date. Iterations are timeboxed; slipping the date breaks the rhythm of tested, integrated releases.
Check yourselfA colleague says: "Inception is where we gather the requirements, elaboration is where we design, and construction is where we code." What is wrong?
That is waterfall laid over the UP's phase names. Inception is a short feasibility step (vision, business case, ~10% of use cases detailed, go / no-go). Elaboration writes and tests production code for the core architecture while most requirements are discovered. All the disciplines (requirements, design, implementation, test) happen in every phase; only the mix changes.
Check yourselfA team spent two months in "inception", wrote all 60 use cases fully dressed, fixed the architecture, and now trusts its estimates. Which signs say this wasn't really inception?
At least four: it took more than a few weeks; they tried to define most requirements (writing all use cases in detail); they defined the architecture; and they expect reliable estimates. Inception should detail about 10% of the use cases and end with a go / no-go decision, leaving reliable estimates for elaboration.
Check yourselfMatch each term to its meaning: milestone, release, increment, development cycle. (i) a stable executable subset; (ii) the difference between two consecutive releases; (iii) many iterations ending in a production release; (iv) the end-point of an iteration where a decision is made.
Milestone = (iv); release = (i); increment = (ii); development cycle = (iii).
Check yourselfAccording to the Week 11 lecture, in which phase do design and modelling usually happen, and must the architecture be finished first?
Usually in elaboration, where the Domain Model, Design Model and Software Architecture Document may be started. The architecture does not have to come first: architecture, domain model and design model can be developed concurrently over several iterations.
- Iterations are short (2–6 weeks), timeboxed (de-scope, never slip) and end with tested, executable partial systems; planning is risk- and client-driven.
- Phases: Inception (feasibility, ~10% detailed, go / no-go) → Elaboration (core architecture coded, 80–90% of requirements, ~10% built) → Construction → Transition. Disciplines run through all of them.
- Design and modelling usually happen in elaboration, in short bursts of lightweight UML near the start of each iteration.
Requirements and FURPS+ exam
A requirement that nobody wrote down is a requirement that nobody builds. But "requirements" covers very different things, from "process a sale" to "respond within 30 seconds" to "must be written in Java". This section sorts them into kinds, gives the UP's checklist (FURPS+) so that no kind is forgotten, and shows which artefact each kind lives in.
Larman, citing Jacobson et al.: capabilities and conditions to which the system, and more broadly the project, must conform.
Managing requirements is a systematic approach to finding, documenting, organising and tracking the changing requirements of a system. It is done iteratively, not by freezing a full specification up front. Elicitation techniques include writing use cases with customers, requirements workshops with developers and customers, focus groups, and demos of each iteration's result to get feedback.
Functional vs non-functional
Requirements split into two broad kinds, and there is a quick linguistic test to tell them apart: try putting the requirement after "The system does…".
| Functional (behavioural) | Non-functional (everything else) | |
|---|---|---|
| States | What the system does: features, capabilities, behaviour | Qualities of the system and constraints on it |
| Linguistic test | Passes "The system does ⟨X⟩", e.g. "does payment authorisation" | Fails it, e.g. "does Linux", "does 24/7 availability" |
| Where recorded (UP) | Use cases (the Use-Case Model); system-wide features in the Supplementary Specification | A use case's Special Requirements first, then consolidated in the Supplementary Specification |
| POS examples | Process a sale, handle returns, authorise credit payments, log errors | Credit authorisation within 30 s 90% of the time; text visible from 1 m; must be written in Java; tax rules must follow law |
Quality requirements (usability, reliability, performance, supportability) are also called quality attributes or the "-ilities". They matter because they strongly shape the architecture (Part VIII). For example, a high-reliability requirement for when remote services fail drives large-scale design decisions.
FURPS+: the checklist
FURPS+ is the UP's requirements categorisation. Use it as a checklist when eliciting or reviewing requirements, so that no category is forgotten. The five letters are the main categories; the "+" adds further ones.
| Letter | Category | Covers | NextGen POS example |
|---|---|---|---|
| F | Functional | Features, capabilities, security | Sales capture; payment authorisation; all usage requires user authentication; log all errors to persistent storage |
| U | Usability | Human factors, help, documentation | Text readable from 1 m; avoid colour-blindness-sensitive colours; signal warnings by sound, since the cashier is looking at the customer |
| R | Reliability | Frequency of failure, recoverability, predictability | If the payment authoriser or accounting system fails, use a local store-and-forward solution so the sale still completes |
| P | Performance | Response time, throughput, accuracy, availability, resource usage | Payment authorisation in under 1 minute, 90% of the time |
| S | Supportability | Adaptability, maintainability, internationalisation, configurability | Pluggable business rules at defined points; configurable network topology; multiple languages |
| + | Implementation | Resource limits, languages and tools, hardware | "Must use Java technologies" |
| + | Interface | Constraints from interfacing with external systems | Must plug in different tax calculators, accounting and inventory systems; touch screen, bar-code scanner, card reader |
| + | Operations | System management in its operational setting | How errors are handled, how often backups run |
| + | Packaging | e.g. a physical box | — |
| + | Legal | Licensing and so on | Open-source licence terms; tax rules must by law be applied |
Larman ch. 5 lists availability and accuracy under Performance. The Week 10 architecture slides put availability ("up time") and calculation accuracy under Reliability, and recovery time, start-up time and shut-down time under Performance. In the exam either placement is defensible if you name the quality clearly, e.g. "availability, a reliability/performance quality".
Where requirements live: the UP requirements artefacts
Use-Case Model
The set of written use cases, plus an optional use case diagram.Supplementary Specification
System-wide FURPS+ qualities; reports; hardware, software and development constraints; i18n; documentation and help; licensing and legal; packaging; standards; operational concerns; domain rules; and functional features that don't fit a use case (logging, report generation).Glossary
Noteworthy terms and definitions. Also the data dictionary: format, validation rules, value ranges, aliases, composite terms ("payment authorization request"). Start it early: it removes ambiguity.Vision
Business case, problem statement, stakeholders, key goals, the actor-goal list, and a terse system features list (ideally under 10). References other requirements rather than duplicating them.Business (Domain) Rules
Long-lived rules that transcend one application, such as tax laws or "credit reversals only to the credit account". Kept separate so they can be reused across projects.Larman's Fig. 6.1 (also on the Week 1 and 2 slides) shows how these artefacts feed one another, with the use case text as the starting point.
Check yourselfClassify each NextGen POS requirement into FURPS+: (a) all usage requires user authentication; (b) warnings are signalled by sound; (c) if the accounting system is down, store sales locally and forward them later; (d) authorisation in under 1 minute 90% of the time; (e) pluggable business rules; (f) must use Java technologies.
(a) F, since security is functional. (b) U, usability (the cashier is looking at the customer). (c) R, recoverability. (d) P, response time. (e) S, adaptability/configurability. (f) + Implementation (languages and tools).
Check yourself"Credit authorisation must respond within 30 seconds" applies only to Process Sale. Where is it recorded first, and where does it usually end up?
First in the Special Requirements section of the Process Sale use case; non-functional requirements are often consolidated later in the Supplementary Specification. It fails the linguistic test ("the system does 30 seconds"), so it is non-functional (Performance).
- Functional = what the system does (passes "The system does ⟨X⟩"); non-functional = qualities and constraints.
- FURPS+: Functional (incl. security), Usability, Reliability (incl. recoverability), Performance, Supportability, plus Implementation, Interface, Operations, Packaging, Legal.
- Artefacts: Use-Case Model, Supplementary Specification, Glossary (data dictionary), Vision, Business Rules. Use case text feeds SSDs, the domain model, Glossary and Vision.
Use Cases, Scenarios and Actors exam
Long "the system shall…" feature lists are hard for customers to read and easy to get wrong, because they describe features out of context. Use cases replace them with stories of someone using the system to get something done. This section defines the vocabulary, each term building on the one before, and then the three kinds of actor.
The core terms
SuD (System under Discussion, or under Design): the system whose behaviour we are specifying.
Actor: something with behaviour: a person (identified by role, e.g. Cashier), a computer system or an organisation. One person can play several roles. The SuD itself counts as an actor when it calls on other systems' services.
Scenario (or use case instance): a specific sequence of actions and interactions between actors and the SuD. One particular path, such as "buy items with cash successfully" or "fail to buy because credit is denied".
Use case: a collection of related success and failure scenarios that describe an actor using the SuD to support a goal. RUP/Jacobson: "a set of use-case instances, where each instance is a sequence of actions a system performs that yields an observable result of value to a particular actor."
Use-Case Model: the set of all written use cases (a model of the system's functionality and environment), plus an optional UML use case diagram.
So a use case and a scenario differ as a set differs from one of its members. The picture makes this concrete.
- Use cases are text, not diagrams. Use-case modelling is mainly writing; fixating on diagrams is a novice mistake.
- They are requirements, mainly functional ones (the F in FURPS+), but not all the requirements.
- In Cockburn's terms, a use case is a contract for the system's behaviour.
- They are not object-oriented, but they are the key input to OOA/D.
Why use them at all? They are simple stories that customers can write and review, which keeps users involved (and lack of user involvement is a top cause of project failure). They focus on who uses the system, their typical scenarios and their goals. They organise requirements in context instead of long feature lists. And they drive design (through use-case realisations), iteration planning, estimation, testing and user manuals.
The three kinds of actor
Actors come in three kinds, depending on how they relate to the SuD, and each kind is worth finding for a different reason. Throughout this page, primary, supporting and offstage actors keep these colours.
| Actor type | Definition | Why identify it | POS example | Tony's Pizza example |
|---|---|---|---|---|
| Primary | Has user goals fulfilled by using the SuD's services. Usually starts the interaction. | To find the user goals that drive the use cases | Cashier | Customer, Restaurant Staff, Delivery Staff, Restaurant Manager |
| Supporting (also secondary) | Provides a service (e.g. information) to the SuD. Often a computer system, but can be an organisation or person. | To clarify external interfaces and protocols | Payment Authorization Service, Tax Calculator, Accounting System, Inventory System | Payment Service (a system), Supplier (a person or organisation) |
| Offstage | Has an interest in the behaviour of the use case, but is neither primary nor supporting | To make sure all stakeholder interests are identified and satisfied; they are easy to miss | Government tax agency | Tony, the owner |
Three further points
Primary actors can be non-human. In the POS diagram the Sales Activity System is a primary actor, because it requests sales data from the POS. Similarly, "time" can be an actor when the system reacts to a time event, such as producing a nightly report.
Who is primary depends on the system boundary. Move the boundary and the primary actor changes:
A related case: for a ticket website that a phone agent uses exactly as a customer would, the agent is only a proxy, so the Customer is the primary actor.
Internal parts of the SuD are not actors. The system's own database, back-end server or classes are inside the boundary. Only external systems are supporting actors. The course's notation reference makes this explicit: the back-end server that processes every request is not drawn as an actor.
Check yourselfIs "Pay by credit, but the card is declined" a use case or a scenario? What about "Process Sale"?
"Pay by credit, card declined" is a scenario: one specific path (a failure path). "Process Sale" is a use case: the goal-named set that contains the main success scenario and all extensions, including that failure.
Check yourselfFor a ride-sharing app (the SuD), classify: the Rider who books a trip; an external Mapping Service that computes routes; the transport regulator that wants trips logged; the app's own trip database.
Rider: primary (has the goal "book a trip"). Mapping Service: supporting (provides a service to the SuD). Transport regulator: offstage (interest only). The trip database: not an actor, because it is inside the system boundary.
Check yourselfA system emails a sales summary to managers every night at midnight. Who is the primary actor of "Produce Nightly Report"?
Time. The system reacts to a time event, so time can be treated as the actor that triggers the use case. (Primary actors don't have to be human.)
- A use case is a goal-named set of success and failure scenarios; a scenario is one path (one instance). Use cases are text, and mainly functional requirements.
- Primary actors have the goals; supporting actors provide services to the SuD; offstage actors only have interests.
- Who is primary depends on the boundary; internal parts (database, server) are never actors.
Use Case Formats and the Fully Dressed Template exam
Writing every use case in full detail on day one would be waterfall in disguise, but some use cases do need full detail early because they carry the architecture. So use cases come in three formats of increasing detail, and you choose the format by how far into the project you are and how important the use case is.
Three formats
Brief: Process Sale
A customer arrives at a checkout with items. The cashier uses the POS system to record each item. The system shows a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer gets a receipt and leaves with the items.
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… Alternate scenarios: If the customer paid by credit and the reimbursement to their credit account is rejected, inform the customer and pay them in cash. If the item identifier isn't found, notify the cashier and suggest manual entry. If the system can't communicate with the external accounting system, …
There is also a two-column ("conversational") variation that puts the actor's actions and the system's responsibilities in separate columns. No single format is best; what matters is writing the main success scenario and its extensions in some form.
| Actor Action | System Responsibility |
|---|---|
| 3. Cashier enters item identifier. | 4. Records sale line item and presents item description, price and running total. |
Use case writing across the UP phases
Larman's Table 6.1 is a sample (not a recipe) of how the writing might be spread across a project. Notice how it matches the 10% and 80–90% figures from Section 1.4.
The fully dressed template, section by section
A fully dressed use case follows a standard template. Step through it below using Larman's UC1: Process Sale (condensed). On the left the template fills in; on the right is the current section's content and the rule for writing it.
- The header. Name (verb first: Process Sale), Scope (the SuD), Level (user goal) and Primary Actor (Cashier). The course uses two levels, user-goal and subfunction; Cockburn defines others, such as summary.
- Stakeholders and Interests. Who cares about this use case and what each wants. Note the offstage tax agency and the supporting payment service: their interests explain later steps.
- Preconditions. Only what's worth telling the reader. They are assumed, never tested inside the use case.
- Success Guarantee. What's true at the end of any successful path. Each clause answers some stakeholder's interest.
- Main Success Scenario, one of the two major sections. Ten numbered steps, every one naming its actor, and not a single "if".
- Extensions, the other major section and usually the longest. Every condition is detectable ("System detects failure…"), and the labels show where each branch can occur.
- Special Requirements. The non-functional requirements for this use case. Compare with FURPS+: usability, performance, reliability, internationalisation, supportability.
- Technology and Data Variations. Only how (scanner vs keyboard; UPC vs EAN), never what.
- Frequency and Open Issues. The template is complete. Reread it: the MSS and the Extensions carry the behaviour; everything else frames it.
Use Case UC1: Process Sale
Scope: NextGen POS application Level: user goal Primary Actor: Cashier
Stakeholders and Interests:
- Cashier: fast, accurate entry; no payment errors (drawer shortages come out of pay).
- Salesperson: sales commissions updated.
- Customer: purchase quickly with minimal effort; visible item/price display; proof of purchase for returns.
- Company: accurate transaction records; payment receivables recorded; fault tolerance
(capture sales even if remote services are down); fast automatic accounting & inventory update.
- Manager: quick override operations; easy debugging of Cashier problems.
- Government Tax Agencies (offstage): collect tax from every sale.
- Payment Authorization Service (supporting): requests in correct format/protocol; accurate payables.
Preconditions: Cashier is identified and authenticated.
Success Guarantee: Sale saved. Tax correctly calculated. Accounting and Inventory updated.
Commissions recorded. Receipt generated. Payment authorization approvals recorded.
Main Success Scenario:
1. Customer arrives at POS checkout with goods and/or services to purchase.
2. Cashier starts a new sale.
3. Cashier enters item identifier.
4. System records sale line item and presents item description, price, and running total.
(Price calculated from a set of price rules.)
Cashier repeats steps 3-4 until indicates done.
5. System presents total with taxes calculated.
6. Cashier tells Customer the total, and asks for payment.
7. Customer pays and System handles payment.
8. System logs completed sale and sends sale and payment information to the external
Accounting system and Inventory system.
9. System presents receipt.
10. Customer leaves with receipt and goods (if any).
Extensions (selection):
*a. At any time, Manager requests an override operation:
1. System enters Manager-authorized mode.
2. Manager or Cashier performs one Manager-mode operation (e.g. void a sale).
3. System reverts to Cashier-authorized mode.
*b. At any time, System fails:
1. Cashier restarts System, logs in, and requests recovery of prior state.
2. System reconstructs prior state.
2a. System detects anomalies preventing recovery:
1. System signals error to Cashier, records the error, enters a clean state.
2. Cashier starts a new sale.
3a. Invalid item ID (not found in system):
1. System signals error and rejects entry.
2. Cashier responds to the error (manual ID entry, manual price with Manager
override, or performs Find Product Help).
3b. Many items of the same category, unique identity unimportant:
1. Cashier enters item category identifier and the quantity.
3-6a. Customer asks Cashier to remove (void) an item:
1. Cashier enters item identifier for removal.
2. System removes item and displays updated running total.
2a. Item price exceeds Cashier's void limit:
1. System signals error and suggests Manager override. ...
3-6b. Customer tells Cashier to cancel sale:
1. Cashier cancels sale on System.
5a. System detects failure to communicate with external tax calculation service:
1. System restarts the service on the POS node, and continues.
1a. System detects that the service does not restart:
1. System signals error.
2. Cashier may manually calculate and enter the tax, or cancel the sale.
5b. Customer says they are eligible for a discount (e.g. employee):
1. Cashier signals discount request and enters Customer identification.
2. System presents discount total, based on discount rules.
7a. Paying by cash:
1. Cashier enters the cash amount tendered.
2. System presents the balance due, and releases the cash drawer.
3. Cashier deposits cash tendered and returns balance in cash to Customer.
4. System records the cash payment.
7b. Paying by credit:
1. Customer enters their credit account information.
2. System displays their payment for verification.
3. Cashier confirms.
3a. Cashier cancels payment step: 1. System reverts to "item entry" mode.
4. System sends payment authorization request to external Payment Authorization
Service, and requests payment approval.
4a. System detects failure to collaborate with external system:
1. System signals error to Cashier. 2. Cashier asks Customer for alternate payment.
5. System receives payment approval and signals approval to Cashier.
5a. System receives payment denial:
1. System signals denial to Cashier. 2. Cashier asks Customer for alternate payment.
6. System records the credit payment, which includes the payment approval. ...
9c. Printer out of paper:
1. If System can detect the fault, it signals the problem.
2. Cashier replaces paper. 3. Cashier requests another receipt.
Special Requirements:
- Touch screen UI on large flat panel; text visible from 1 metre.
- Credit authorization response within 30 seconds 90% of the time.
- Robust recovery when remote services (e.g. inventory) fail.
- Language internationalization of displayed text.
- Pluggable business rules insertable at steps 3 and 7.
Technology and Data Variations List:
*a. Manager override by swiping an override card, or entering an authorization code.
3a. Item identifier entered by bar code laser scanner or keyboard.
3b. Item identifier may be any UPC, EAN, JAN, or SKU coding scheme.
7a. Credit account information entered by card reader or keyboard.
7b. Signature captured on paper receipt (digital capture expected within two years).
Frequency of Occurrence: could be nearly continuous.
Open Issues: tax law variations? remote-service recovery? per-retailer customisation?
Must a cashier take the cash drawer on log out? Can the customer use the card reader directly?
This is a selection. The full original also has 2-4a (tax-exempt status), 3c, 4a (manual price override), 5c (account credit), 6a, 7c–7f (cheque, debit, cancel payment, coupons), 9a–9b (rebates, gift receipt), and steps 7–9 of 7b (signature capture).
- The stakeholder list includes the offstage actor (tax agency) and the supporting actor (payment service), and their interests explain steps such as "send to Accounting system" and "record approvals".
- The MSS contains no "if": every condition is in the Extensions.
- The Extensions use
*a(any time),3-6a(step range) and nested2a/1alabels, and each condition is detectable ("System detects failure…"). - Paying by cash, credit and so on are extensions of step 7, which makes step 7 a natural place to factor out subfunction use cases (Section 1.10).
- The Special Requirements are non-functional, and the Technology and Data Variations say how (scanner or keyboard), never what.
Extension numbering
An extension's label says where in the main success scenario it can branch off. There are four patterns, shown on one picture.
3a = at step 3 (letters distinguish different conditions at the same step: 3a, 3b). 3-6a = anywhere from step 3 to 6. *a = at any time. A nested 4a inside 7b branches from step 4 of the extension. By default an extension merges back; if it doesn't, it must say so ("use case ends").| Label | Meaning | Example |
|---|---|---|
3a, 3b, … | Alternatives that branch at step 3. The letter distinguishes different conditions at the same step. | 3a. Invalid item ID: |
3-6a | The condition can arise at any step from 3 to 6 | 3-6a. Customer asks Cashier to remove an item: |
*a, *b | The condition can happen at any time | *a. At any time, System fails: |
Nested 2a inside an extension | A branch within the extension's own steps, indented under it | Inside 7b. Paying by credit: step 4, 4a. System detects failure to collaborate with external system: |
Four more rules govern how extensions are written:
- Merge back by default. After its handling, an extension rejoins the main success scenario. If it doesn't, say so explicitly ("use case ends", "Cashier cancels sale").
- Write detectable conditions. Prefer "5a. System detects failure to communicate with external tax calculation service" over "5a. Tax system not working": the second is an inference, not something the system can observe.
- Name another use case when you branch into it. Underline its name (Cockburn style) or write "Include Handle Credit Payment", as in "2c. Cashier performs Find Product Help…". See Section 1.10.
- Factor out the complex ones. If an extension grows very complex, as paying by credit does, move it into a separate subfunction use case.
A second worked example: LazyFair "Update Catalog Item" (Workshop 1)
Use Case UC1: Update Catalog Item
Scope: LazyFair software system Level: user goal Primary Actor: Store Manager
Stakeholders and Interests: Store Manager – wants to change an existing catalog item quickly and correctly.
Preconditions: Store Manager has authenticated. Item exists in catalog.
Success Guarantee: Item in catalog updated with entered and confirmed changes.
Main Success Scenario:
1. Include UC2: Search for Catalog Item.
2. System displays existing attributes of the catalog item.
3. Store Manager edits attributes of the catalog item.
4. Store Manager confirms; System saves changes.
Extensions:
2a. Search unsuccessful: use case ends.
*a. Store Manager requests abort of update: use case ends (after confirmation).
*b. Catalog not accessible:
1. System notifies user of the problem and logs details.
2. System initiates periodic reconnection (with status/log updates).
Frequency of Occurrence: tens of times daily.
The alternate flows show both kinds of extension: one at a specific step (2a) and two at any time (*a, *b), and each says whether the use case ends. The search is factored out as a separate use case and included (step 1), which the diagram shows as Update Catalogue Item «include» Search for Catalogue Item (drawn in Section 1.11).
The original workshop solution's steps omitted the actor ("Display existing attributes…"). Larman's idiom is that each step names who acts ("System displays…"), as the version above does. Do that in the exam.
The workshop also advises: if one CRUD operation (Create, Retrieve, Update, Delete) is needed, check whether the others are too. They can then be collapsed into a single "Manage ⟨X⟩" use case, such as Manage Catalogue Items.
Check yourselfGive the label for: (a) a second, different condition that can arise at step 4; (b) a condition that can arise anywhere in steps 2–5; (c) the network dropping at any moment; (d) a failure at step 2 of extension 6a.
(a) 4b (if 4a already exists). (b) 2-5a. (c) *a. (d) a nested 2a, indented under 6a.
Check yourselfWhich section does each belong in? (a) "Item ID may be entered by scanner or keyboard"; (b) "Receipt printed within 2 seconds"; (c) "Cashier is logged in"; (d) "Inventory updated"; (e) "What happens with tax-exempt customers?"
(a) Technology and Data Variations (how, not what). (b) Special Requirements (non-functional, performance). (c) Preconditions. (d) Success Guarantee. (e) Open Issues.
Check yourselfSpot the problems: MSS step "4. If the item is on promotion, System applies the discount." and extension "5a. Tax system not working: tell the cashier."
Step 4 puts a conditional in the main success scenario. Keep step 4 unconditional and move the branch to an extension such as 4a. Item is on promotion: 1. System applies the promotional discount. Extension 5a has an undetectable, inferred condition and no clear outcome. Rewrite: 5a. System detects failure to communicate with external tax calculation service: 1. System signals error to Cashier. 2. Cashier manually enters the tax, or cancels the sale (use case ends).
- Brief (one paragraph, MSS), casual (several paragraphs), fully dressed (template; ~10% early, 80–90% by end of elaboration).
- Template: Name, Scope, Level, Primary Actor, Stakeholders & Interests, Preconditions, Success Guarantee, MSS, Extensions, Special Requirements, Technology & Data Variations, Frequency, Open Issues.
- MSS has no "if"; extensions have a label (
3a,3-6a,*a, nested), a detectable condition, handling, and an explicit end if they don't merge back.
Writing Good Use Case Text exam
Two people can describe the same behaviour and produce one use case that survives a redesign and one that is obsolete the moment the screen layout changes. Five guidelines make the difference. Each is shown below as a bad/good pair.
1. Essential (UI-free) style
"Keep the user interface out; focus on intent." Write what the actor is trying to achieve, not which widgets they touch. The concrete style is only for later, detailed GUI design.
2. Black-box
Describe the system's responsibilities (what it does), not its internal workings (how it does it). The system is a black box: you see what goes in and what comes out.
3. Terse
Delete noise words. Every word of a use case should carry meaning.
"The System then proceeds to authenticate the user's identity."
"System authenticates…"
4. Actor and actor-goal perspective
Focus on what gives the actor an observable result of value. The question you ask when eliciting requirements matters: "What do you do?" tends to produce a description of the current procedure, steps and all, while asking about goals gets at what the system is actually for.
"What do you do?"
"What are your goals whose results have measurable value?"
5. Root goals
The first thing a stakeholder mentions is often a mechanism, not a goal. Climb the goal hierarchy by asking "why?" until you reach the real requirement.
A quality checklist for use case flows (Workshop 1)
- Is it clear how the use case starts, and does the flow have a definite ending?
- Is every step at the same level of abstraction?
- Does every step describe something that can actually happen and that the system can reasonably detect?
- Does every step make progress toward the goal?
- Are any steps missing? Is it clear how to get from one step to the next, and does the order match what users expect?
- Is every step technology-independent, free of technical details and accidental design decisions?
- Are the steps correctly numbered?
- For each alternate flow, is the triggering condition clearly defined, and is it clear whether it ends the use case or where it resumes?
The workshop discussion added three points. A well-written use case has clarity, a well-defined scope, a glossary of domain terms, and a complete description (main success scenario plus alternate paths). You should write as many use cases as you need, one per user goal; the POS had about 20 user-goal use cases. And if you can only keep one of text or diagram, keep the text.
Check yourselfRewrite in good style: "3. The Customer then clicks the green 'Add to Cart' button, and the system inserts a row into the CART table."
"3. Customer adds the item to the cart. 4. System records the item in the cart." This removes the UI detail (button, colour: essential style), the internal mechanism (table, row: black-box), the noise word "then" (terse), and gives each action its own step with a named actor.
Check yourselfA stakeholder says "Users need a login screen with a password." Applying the root-goal guideline, what is the requirement really?
"Log in with a password" is a mechanism. The goal is for the user to identify and authenticate themselves (and, higher up, to prevent theft or misuse). Writing the goal leaves room for better solutions, such as a fingerprint reader.
- Essential (no UI), black-box (what, not how), terse, actor-goal focused (observable result of value), root goals (climb past mechanisms).
- Check flows: clear start and end, one abstraction level, detectable and progressing steps, technology-free, correct numbering, and each alternate flow says whether it ends or where it resumes.
Finding Use Cases and Choosing the Right Level exam
Given a page of requirements, how do you decide what the use cases are? Too fine-grained and you get "Enter Item ID"; too coarse and you get "Run the Business". This section gives Larman's procedure for finding use cases, then three tests for judging whether a candidate is at a useful level.
The procedure (Larman 6.15)
Work outward: first the boundary, then who stands outside it, then what they want.
Some questions reveal actors and goals you might otherwise miss. Who starts and stops the system? Who does system administration, and user and security management? Is "time" an actor (does the system react to time events)? Is there a monitoring process that restarts it? How are software updates handled? Who evaluates activity, performance or logs? Who is notified of errors? Do any external software or robotic systems call on its services?
Organising the results. You can draw the results directly in a use case diagram, or first write an actor-goal list (it can live in the Vision) and then draw the diagram. Larman's guideline is to draw a simple use case diagram together with an actor-goal list. For the POS:
| Actor | Goals |
|---|---|
| Cashier | process sales, process rentals, handle returns, cash in, cash out |
| Manager | start up, shut down |
| System Administrator | add/modify/delete users (collapsed into Manage Users), manage security, manage system tables |
| Sales Activity System (non-human primary) | analyse sales and performance data |
Event analysis is an alternative route. List the external events, where they come from and why; groups of events usually belong to the same use case.
Three tests for a useful use case
Nearly anything can be a use case at some level, so the practical question is: "What is a useful level to express use cases for application requirements analysis?" Three tests help.
Your boss asks "What have you been doing all day?" Would they be happy with the use case name as your answer? "Logging in!" fails: it isn't strongly related to results of measurable value.
An Elementary Business Process is a task performed by one person in one place at one time, in response to a business event, which adds measurable business value and leaves the data in a consistent state (e.g. Approve Credit, Price Order).
A use case is very seldom a single action or step. It usually has many steps; fully dressed it often runs to 3–10 pages. A name that suggests one step in a larger sequence (Enter an Item ID) fails.
The EBP test fails a candidate in both directions: a single small step ("delete a line item", "print the document") is too small, and something spanning days and multiple sessions ("negotiate a supplier contract") is too big.
Now apply all three tests to Larman's examples (plus one from the lecture). Each test knocks out some candidates.
- Six candidates, all of which someone might propose as a use case. Which are at a useful level?
- Boss Test. "I spent all day logging in" won't impress anyone: Log In fails. Logging in is a mechanism, not a result of measurable value.
- EBP Test. Negotiate a Supplier Contract takes days and many sessions: much broader than an EBP, so it is a business use case, not a system one. Delete a Line Item is a single small step (it fails Size too); it belongs as an extension (
3-6a) of Process Sale. - Size Test. Move Piece on Game Board and Enter an Item ID are single steps; written fully dressed they would be absurdly short.
- Verdict. Only Handle Returns passes all three: the boss is happy, it is an EBP, and it is a good size. That is the level to write use cases at.
Reasonable violations
The tests are guides, not laws. Some use cases fail a test and are still worth writing:
Pay by Credit
A subfunction use case, worth writing when it is shared by several base use cases, which link to it with include.Authenticate User
May be complex enough to deserve analysis, for example with single sign-on.Play Monopoly Game
The only significant use case in Larman's Monopoly case study; its primary actor is an Observer watching a simulation. Still the right use case. The game rules go in the Supplementary Specification as domain rules, not in extensions.Levels and related terminology
The vocabulary comes in three pairs, and the same two use cases illustrate all three.
| Pair | First term | Second term |
|---|---|---|
| Level | User-goal: fulfils a primary actor's goal; roughly an EBP (Process Sale) | Subfunction: sub-steps supporting a user goal, usually factored out because shared (Handle Credit Payment, Edit Pizza) |
| Instantiation | Concrete: initiated by an actor; performs the entire behaviour the actor wants (Process Sale) | Abstract: never instantiated on its own; always part of another use case (Handle Credit Payment) |
| Relationship role | Base: includes another use case, or is extended or specialised by one (Process Sale) | Addition: the one included, extending or specialising (Handle Credit Payment) |
Check yourselfApply the tests: (a) Print Receipt; (b) Withdraw Cash (at an ATM); (c) Plan Next Year's Budget; (d) Manage Users.
(a) Fails EBP and Size: a single step, better as a step or extension of a bigger use case. (b) Passes: one person, one session, a few minutes, measurable value, several steps. (c) Fails EBP: it spans days and many sessions, so it is a business use case. (d) Acceptable: the usual CRUD exception, where add/modify/delete user goals are collapsed into one "Manage ⟨X⟩" use case.
Check yourselfProcess Rental includes Handle Credit Payment. Which of Process Rental and Handle Credit Payment is base, addition, concrete, abstract, user-goal and subfunction?
Process Rental: base, concrete, user-goal. Handle Credit Payment: addition, abstract, subfunction.
- Find use cases by: boundary → primary actors → their goals → one verb-named use case per goal (CRUD → "Manage ⟨X⟩"). Keep an actor-goal list.
- Boss (measurable value), EBP (one person, place, time; business value; consistent data; 5–10 steps), Size (many steps) tests find the useful level.
- Pairs: user-goal / subfunction, concrete / abstract, base / addition.
Relating Use Cases: Include, Extend, Generalisation
Once you have twenty use cases, you notice the same chunk of text (say, paying by credit) written out three times, and a few use cases that have grown unreadably long. Relationships between use cases fix this. They do not change the system's behaviour or requirements; they only organise the text, to aid comprehension, cut duplication and manage the documents.
Avoid agonising over use case relationships. Hours spent debating include versus extend are effort misplaced; write the text instead. Cockburn's rule of thumb: prefer include over extend and generalisation, because it causes less confusion.
Which way the arrow points is the most-tested detail, and getting it backwards is a common marked-down error. Learn the three side by side:
«include»: the most common and important
Use include in three situations:
- The same partial behaviour is repeated in two or more use cases. Fowler: "use include when you are repeating yourself in two or more separate use cases and you want to avoid repetition."
- A use case is very long and complex, and splitting it into subunits aids comprehension.
- Asynchronous events the user can trigger at any time, or within a range of steps. Use
*aor a range label: "*a. At any time, Customer selects to edit personal information: Edit Personal Information."
In the text, you write the include inside the step or extension (or underline the included use case's name). Process Sale and Process Rental, for example, both pay by credit in the same way:
«extend»
Larman and the course give slightly different reasons for extend, but both come to the same thing: the base use case stays complete and untouched.
Use extend when the base use case's text should not be modified: it is baselined and stable, or constantly adding new conditional steps would be a maintenance headache.
The Tony's Pizza video and the notation reference use it for an optional or future feature you don't want to write into the base now: Place Order with Discount Card, Advanced Search.
The mechanics: the base declares extension points, labels for places in its flow. The extending use case states its trigger/condition and which extension point it uses. Extension points are an indirection, so the base's step numbers can change without breaking the extension.
Optional or conditional behaviour can usually be written as an ordinary extension in the base use case's Extensions section, and that is generally the preferred solution. Use «extend» only when the base must not be modified.
Generalisation
Larman places generalisation outside the scope of his introduction: it adds complexity, practitioners don't agree on how to get value from it, and successful use case experts manage without it. The notation is a solid line with a hollow triangle pointing at the general use case (or general actor). Avoid it in the exam unless asked.
The three side by side
| «include» | «extend» | generalisation | |
|---|---|---|---|
| Purpose | Reuse shared steps; split a long use case | Add behaviour without touching the base | Specialise a general use case |
| Base knows about the addition? | Yes: the base's text calls it at a specific step | No: the extension names the base's extension point | — |
| Addition always executed? | Yes, whenever the base reaches that step (or the condition in the base's extension holds) | Only if its trigger condition holds | — |
| Arrow direction | Base → included | Extending → base | Specific → general |
| Line | Dashed, open arrowhead, «include» | Dashed, open arrowhead, «extend» | Solid, hollow triangle |
| Larman's advice | Preferred, use freely | Only when the base is closed to modification | Avoid |
The Workshop 1 review slides say "include/exclude": a typo, since UML has «include» and «extend». The notation reference sheet writes <<includes>> and <<extend>>. The correct keywords are «include» and «extend» with guillemets, or <<include>> if you can't write guillemets.
Check yourselfA diagram shows a dashed arrow labelled «include» pointing from "Verify Membership" to "Borrow Book". What does that literally say, and what was probably meant?
Literally: Verify Membership is the base, and it includes the whole of Borrow Book, which makes no sense. What was meant: Borrow Book (the base) always performs Verify Membership, so the arrow should run from Borrow Book to Verify Membership. Include points from the base to the included piece.
Check yourselfChoose a mechanism: (a) "Authenticate Customer" appears word for word in Place Order, Cancel Order and Track Order; (b) a baselined, signed-off Place Order use case needs a new loyalty-points feature next year; (c) Place Order sometimes needs a gift message, and nothing stops you editing it.
(a) «include»: repeated partial behaviour. (b) «extend»: the base is closed to modification and the feature is future/optional. (c) An ordinary extension (e.g. 4a. Customer requests a gift message: …) in Place Order's Extensions section, which is Larman's preferred solution when the base can be edited.
- Relationships only organise text; don't agonise. Prefer include.
- «include»: base → included; the base names it; for shared steps, long use cases and
*aasynchronous events. - «extend»: extending → base; base untouched, only exposes extension points; use only when the base can't change (or, in the course, for optional/future features). Generalisation: avoid.
Use Case Diagrams exam
Text is precise but hard to take in at a glance. A use case diagram is the one-page summary: a context diagram showing the system boundary, the actors outside it, the use case names and the relationships between them. It is a communication tool, but it is secondary to the text: if you can only have one, keep the text. The exam can still ask for the diagram on its own, as the 2018 ATM question below shows.
Notation
| Element | Notation | Rules |
|---|---|---|
| System boundary | A rectangle labelled with the system's name | Always name it. Use cases go inside; actors go outside. |
| Human actor | Stick figure, role name underneath | Singular role name ("Customer", not "Customers") |
| Computer-system actor | Class-style box with «actor» and the name | A stick figure is also legal; the box is recommended to distinguish systems from people. Larman also shows a «system» keyword variant. |
| Use case | Oval, verb-phrase name inside | One oval per use case |
| Association ("communication") | Solid line, no arrowheads | Primary actors to the use cases they initiate; supporting actors to the use cases they serve |
| «include» | Dashed arrow, base → included | Section 1.10 |
| «extend» | Dashed arrow, extending → base | Condition and extension point optional on the line |
Layout conventions. Put primary actors on the left and supporting actors on the right (the notation reference, the Tony's Pizza video and Larman Fig. 6.4 all do this). Offstage actors are usually not drawn; name them in the stakeholders list. Limit the diagram to user-goal level use cases, adding subfunctions only to show an include or extend. Keep it short and simple: the details belong in the text.
Drawing one, step by step: Tony's Pizza
The procedure from the Tony's Pizza case-study video, applied to its ordering system. (The use case names are paraphrased from the video, since its diagram is an image.) Actor labels are coloured by kind as elsewhere on this page.
- An empty page. The procedure has six steps; the diagram grows one step at a time.
- 1. Draw the system boundary and write the SuD's name at the top: Tony's Pizza Ordering System.
- 2. Identify and classify the actors. Those who use the system directly are primary, on the left. Those whose services the system uses are supporting, on the right: the Payment Service (a system, so an «actor» box, named generically rather than "PayPal", since technology choices come later) and the Supplier (a person/organisation; the system uses its services but it never uses the system). Offstage Tony is not drawn.
- 3. One oval per user goal, named with a verb phrase. Note what is not a use case: assigning orders to delivery staff happens automatically, and no primary actor has that goal.
- 4. Draw associations: plain solid lines, no arrowheads, from each actor to the use cases it takes part in, including the supporting actors to the use cases they serve.
- 5. Factor out shared and optional behaviour. Edit Pizza is a subfunction included by both Place Order (the customer customises toppings) and Confirm Order (staff modify a pizza when a topping is out of stock), so it is defined once. Place Order with Discount Card is a future feature, so it extends Place Order and stays out of the base text.
- 6. Check (gold): the boundary is named; actor names are singular roles; arrowheads appear only on «include»/«extend», and they point the right way (base → included; extending → base).
More course examples
Online clothing website (the notation reference, redrawn in the appendix). The Customer, on the left, is associated with Search Products, View Products, Manage Cart, Checkout Cart and Buy Now. Checkout Cart and Buy Now both «include» Shipping and Payment, because that behaviour is shared, and Advanced Search «extend»s Search Products as a future feature. On the right are «actor» Inventory Management System and «actor» External Payment Service. The back-end server is part of the system, so it is not an actor.
LazyFair (Workshop 1 solution). The Store Manager is associated with Add Store, Update Catalogue Item and Search for Catalogue Item (Update «include»s Search, matching step 1 of the use case in Section 1.7). The Purchaser is associated with Make Purchase, and the Deliverer with Select Delivery. A fuller answer would add supporting actors on the right, «actor» Payment Service and «actor» Mapping Service, since the worksheet mentions a mapping system.
Past exam: the Pennand ATM (2018 S1 Q8, official answer) exam
The Week 12 review lecture (slides 8–9) shows this question with its official answer. It was the only official past-exam answer in the course material until the official 2021 answers were released on 26–27 October; it is now one of three. It shows that a use case diagram can be asked for on its own: the question just says to draw a use case diagram for the Pennand ATM description.
(1) An account holder can check the balance or make a withdrawal on one of their accounts. (2) When the ATM is idle, the holder inserts a card and enters a PIN, which the ATM authenticates via the banking network. (12) When a customer first inserts a card, the ATM photographs them and checks the card against a locally stored list of stolen cards; a stolen card is kept, and a message is sent to the Police Card Agency before the ATM returns to idle. (13) If the ATM detects a fault at any stage, it switches itself to out-of-service mode, which a maintenance technician uses for diagnosis and repairs before shutting down and restarting the ATM. (Paraphrased; the full paper and answers are on the LMS Sample Exam page.)
Every decision in the answer follows the procedure above:
- One user-goal use case, Use ATM, for the account holder, not separate ovals for inserting the card, entering the PIN or authenticating. Those are single steps that fail the Size and EBP tests, and authentication on its own fails the Boss Test. The slide's own annotation says to use the Boss, EBP or Size test to justify the level, so write a line of justification next to your diagram.
- Check balance and Cash Withdrawal hang off Use ATM through «include». The slide notes this include relationship can be added (citing the Workshop 1 supplementary materials): a worthwhile refinement, not the core of the answer.
- The Banking Network (sentence 2: authentication) and the Police Card Agency (sentence 12: stolen-card report) are supporting actors on the right, both associated with Use ATM. The official answer draws them as stick figures; an «actor» box is equally correct.
- The Maintenance Technician is a second primary actor on the left, with its own goal, Service ATM (sentence 13).
- Left out: detecting a fault and switching to out-of-service mode is something the ATM does by itself, so it is not a use case; the camera and the local stolen-card list are parts of the ATM, not actors.
Check yourselfA student's ATM diagram has ovals "Insert Card", "Enter PIN", "Authenticate" and "Withdraw Cash", and draws "Stolen Card Database" as an actor. What would you change?
Merge the single-step ovals into one user-goal use case (Use ATM, or a goal like Withdraw Cash): Insert Card and Enter PIN fail Size/EBP, and Authenticate fails the Boss Test. Remove "Stolen Card Database": the stolen-card list is stored locally, inside the ATM, so it is not an actor. The external Police Card Agency and Banking Network are the supporting actors.
Check yourselfIn a hotel booking system, guests book rooms and pay through an external payment gateway; the hotel's revenue manager wants occupancy data accurate. Where does each actor go on the diagram?
Guest: primary, a stick figure on the left, associated with e.g. Book Room. Payment gateway: supporting, on the right, preferably an «actor» box, associated with Book Room. Revenue manager (as described, interest only): offstage, not drawn; record the interest in the stakeholders list.
- A context diagram, secondary to the text: named boundary, actors outside (primary left, supporting right, offstage not drawn), verb-phrase ovals inside, solid associations without arrowheads.
- Procedure: boundary → classify actors → one oval per user goal → associations → include shared / extend optional → check.
- Pennand ATM (official): one Use ATM use case justified by the Boss/EBP/Size tests, includes as a refinement, Banking Network and Police Card Agency as supporting actors.
Common Mistakes and Exam Q2 exam
Markers see the same errors every year. This section collects them, drawn from Larman's guidelines, the Workshop 1 checklist and the exam wording, and then gives a recipe and a worked answer for the question type that has appeared as Q2 in both 2021 exams: a brief-format use case.
Mistakes in diagrams
- Unnamed system boundary. Always label the box with the system's name.
- Plural actor name. Use a singular role: Customer, not Customers (and never a person's name).
- Arrowhead on an association. Actor–use case lines are plain solid lines.
- Include drawn solid and pointing the wrong way. It is dashed, labelled «include», and points from the base (Order) to the included piece (Edit Pizza).
- A noun as a use case name. "Payment" is not a goal; use a verb phrase, or (as here) recognise the external payment system as a supporting actor.
- An internal part as an actor. The system's own database is inside the boundary. Meanwhile the real external system, the payment service, was forgotten.
- An offstage actor drawn with an association. The owner only has an interest; list them as a stakeholder.
All twelve mistakes markers penalise
| # | Mistake | bad | better |
|---|---|---|---|
| 1 | The diagram instead of the text: a diagram alone doesn't specify behaviour | Only ovals and stick figures | Written use cases; the diagram is the table of contents |
| 2 | Wrong level | Enter Item ID, Delete Line Item, Move Piece (Size/EBP); Log In (Boss); Negotiate Contract (multi-day) | Process Sale, Handle Returns |
| 3 | UI or technology detail in steps | "Clicks the Buy button", "enters password in dialog box", "saves to MySQL" | "Customer confirms the purchase." "System records the sale." |
| 4 | Conditionals in the main success scenario | "4. If the card is valid, System…" | Unconditional step 4; 4a. Card is invalid: … |
| 5 | Badly formed extensions: no step reference, undetectable condition, no handling, unclear ending, wrong numbering | "Error: show message." | 5a. System detects failure to communicate with …: 1. … 2. Use case ends. |
| 6 | Steps without a named actor, mixed abstraction, no progress | "Display existing attributes." | "System displays the existing attributes." (actor capitalised) |
| 7 | Actor errors: internal parts as actors; forgetting payment, tax or mapping systems; plural or person names; confusing primary with supporting (a supporting actor provides a service to the SuD, it doesn't use it) | "Database", "John", "Customers" | «actor» Payment Service on the right; "Customer" |
| 8 | Names that aren't verb phrases or aren't goal-oriented | "Payment", "Catalogue" | "Pay for Order", "Update Catalogue Item" |
| 9 | Diagram notation errors: unnamed boundary, actors inside it, arrowheads on associations, include/extend backwards or solid, offstage actors with associations | See the figure above | See the corrected figure |
| 10 | Overusing relationships | «extend» or generalisation everywhere | A plain extension in the text, or «include» |
| 11 | Noise preconditions | "System is on", "user has internet" | "Cashier is identified and authenticated." |
| 12 | Waterfall thinking | All use cases fully dressed before any development | ~10% fully dressed in inception, more each iteration |
Exam Q2: the brief-format use case
"For a ⟨domain⟩ system, provide an example of a use case in brief form that has a human primary actor and at least one non-human supporting (secondary) actor. Also describe an alternate (exceptional) scenario that might be part of an extended (fully dressed) form of the use case."
2021 S1's domain was a Computer Game Subscription system; 2021 S2's was a Furniture Removalist/Moving Service.
How much detail do the official answers show? (official answer, released 26/27 Oct) Both official answers (worked in full in Part IX) are short. Each has a use case name, a one-line Assumptions statement (e.g. the customer is authenticated), a main scenario of four to six sentences, and an alternate scenario of three or four sentences that names the condition, says how the system handles it, and ends by saying the use case resumes. Neither labels its actors in a separate list: the supporting systems appear by name inside the sentences, with capitals ("the Subscription Management Service", "the Pricing Engine", "the Payment Gateway"), which is enough to show a non-human supporting actor providing a service. The alternate scenarios are prose, not 3a. numbering, so the numbered form below is a good habit but not a requirement.
A verb-phrase name; a named supporting system that visibly does something; and an exception with its handling and an outcome. The recipe and worked example below are at, or slightly above, the level markers reward.
Recipe
- Pick one user-goal use case that passes the Boss, EBP and Size tests, and name it with a verb phrase (not "Log In", not "Enter Address").
- State the actors: the human primary actor (its role), the non-human supporting actor(s) (the external system and what it provides), and optionally offstage actors.
- Write one paragraph (brief): the trigger, the primary actor's intentions, the System's responsibilities, the interaction with the supporting actor (so it visibly provides a service), and the result of value. Essential, black-box wording; capitalise actor names.
- Write the alternate scenario in extension form: a step reference (it helps to show the numbered steps the paragraph corresponds to), a detectable condition, the handling steps and the outcome (resumes at step N, or the use case ends). A failure of the supporting actor, or a business-rule failure, shows the most understanding.
- Don't add a diagram, UI detail or a database actor. Keep it short: 5 marks is about 6–10 lines.
Worked example (new domain): online library loan system
- Primary actor (human): Library Member.
- Supporting actors (non-human): eBook Licensing Service (external distributor system that issues time-limited loan licences); Email Notification Service (external messaging system).
- Offstage actors: Publisher (wants licence terms enforced); Library (wants accurate loan records).
Brief: A Library Member searches the catalogue and selects an eBook to borrow. The System checks that the Member is eligible to borrow (membership current, under the loan limit, no unpaid fines). The System requests a loan licence for the title from the external eBook Licensing Service, which grants a licence with an expiry date. The System records the loan with its due date and gives the Member access to read the eBook. The System then sends a loan confirmation to the Member through the Email Notification Service.
The same main success scenario, numbered (what the paragraph becomes in fully dressed form):
1. Member searches the catalogue. 2. System presents matching titles with availability. 3. Member selects a title and requests to borrow it. 4. System verifies the Member is eligible to borrow. 5. System requests a loan licence from the eBook Licensing Service. 6. eBook Licensing Service grants the licence with an expiry date. 7. System records the loan with its due date and presents access to the eBook. 8. System sends a loan confirmation via the Email Notification Service.
Alternate scenario (an extension in the fully dressed form):
6a. eBook Licensing Service reports that no licence is available (all copies on loan):
1. System informs the Member that the title is unavailable and offers to place a hold.
2. Member accepts the hold.
3. System records the hold in the title's queue and confirms the Member's queue position.
4. Use case ends; no loan is recorded.
Other valid alternates: 4a. Member has reached the loan limit or has unpaid fines: System informs the Member of the reason; use case ends. 5a. System detects failure to communicate with the eBook Licensing Service: System logs the error and asks the Member to try again later; use case ends with no loan recorded.
Why this answer is strong, point by point:
- The name is a verb phrase at user-goal level: the boss is happy, it is one person in one session, and it leaves a recorded loan (consistent data).
- The actors are labelled by type, and the supporting actors visibly provide services in the text (the licence, the notification).
- The text is essential and black-box: no buttons, screens or database.
- The alternate scenario is tied to a step, has a detectable condition, and states its handling and outcome.
The weak answer to avoid
Check yourselfPractise Q2: for a food delivery app, give a brief use case with a human primary actor and a non-human supporting actor, and one alternate scenario.
Use case: Order Meal (Food Delivery System). Primary actor: Customer. Supporting actor: Payment Gateway (external system that authorises card payments). Brief: A Customer chooses a restaurant and selects dishes. The System shows the order total including delivery fee. The Customer confirms and pays; the System requests authorisation from the Payment Gateway, which approves the payment. The System records the order, sends it to the restaurant and shows the Customer the estimated delivery time.
Alternate: 5a. Payment Gateway declines the payment: 1. System informs the Customer and asks for another payment method. 2. Customer enters another method; use case resumes at step 5. (Our example; any domain works if the name is a verb phrase, the supporting system visibly provides a service, and the exception has a detectable condition, handling and outcome.)
Check yourselfA student's answer: "Use case: Payment. The user clicks Pay. The MySQL database stores the order. If something goes wrong, an error appears." List every problem.
(1) "Payment" is a noun, not a verb-phrase goal. (2) "The user" is not a named role, and there is no human primary actor clearly stated. (3) "Clicks Pay" is UI detail. (4) The MySQL database is an internal component, not a supporting actor; no external system visibly provides a service. (5) "If something goes wrong" is a vague, undetectable condition with no step reference. (6) "An error appears" gives no handling outcome: does it resume or end?
- The most-penalised errors: wrong level, UI/technology in steps, "if" in the MSS, malformed extensions, actor errors (internal parts, forgotten supporting systems, plurals), backwards or solid include/extend, unnamed boundary.
- Q2 recipe: verb-phrase user-goal name → actors (human primary, non-human supporting) → one paragraph where the supporting system visibly does something → one extension with step, detectable condition, handling and outcome. 6–10 lines, no diagram.