Use Case Modeling and Analysis
Prerequisite Knowledge
This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.
Previously Covered in This Subject
- What a Use Case Really Is — covered in Lecture 4
- Functional Requirements Through Use Cases — covered in Lecture 3
- System Boundary and the Black-Box View — covered in Lecture 2
- Primary and Secondary Actors and Notation — covered in Lecture 5
- Writing Use Cases — Formats and Templates — covered in Lecture 3
- Finding and Checking Use Cases — covered in Lecture 5
# Use Case Modeling and Analysis
6.1 Use Cases as Collections of Scenarios for a Goal
6.1.1 What a Use Case Really Is
Hook — Why not just list features? Imagine you tell a builder "I want a kitchen" and hand over a bullet list — sink, stove, fridge. The builder could place them in ways that are useless to you because you never described how you cook. What missing piece turns a feature list into something a builder can actually get right?
A use case — a story of how an actor uses a system to reach a goal — is a collection of related scenarios that share one goal and cover both success and failure outcomes. A scenario (also called a use case instance) is one specific sequence of interactions between actors and the system — one path through the use case. The use case is the complete set; each scenario is one member of that set. This is the RUP definition restated in plain words: "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."
Think of a theatre play to anchor the relationship. The overall drama — say, "Resolve a shoplifting dispute" — is the use case. Each performance on a different night, with different audience reactions and different improvisations, is a scenario. When the system helps a cashier handle a return, the success path (receipt found, refund issued) and the failure paths (receipt not found, reimbursement rejected) are different scenes, but they all belong to the same drama because they serve the same goal.
Intuition — the switch statement. The professor's programming picture makes the set-member idea concrete. In C or Java you might write: switch(input) { case A: doX(); break; case B: doY(); break; case C: doZ(); break; } Each case is a scenario. The whole switch — all cases grouped under one purpose — is the use case. Just as the switch handles every value that should be handled for that purpose, the use case must handle the success case and every meaningful alternate or failure case for that goal. The mapping breaks where code ends and people begin: a switch is deterministic input-to-branch logic, while a use case involves human judgment, waiting, errors, and negotiated outcomes that no switch alone captures.
Formalize — use case vs. scenario vs. instance. Use the terms precisely:
- Actor — something with behavior (person in a role, organization, external software, hardware device) that interacts with the system under discussion. Example: Cashier.
- Scenario — one concrete story, step by step, from trigger to outcome. Also called a use case instance or use case instance path.
- Use case — the collection of all scenarios that are variations on the same actor goal. Written as text stories, not as a diagram. The diagram, if drawn, merely lists use case names and actors; the text carries the requirements.
- Use-Case Model — the set of all written use cases for the system, plus optional diagrams, glossary, and supplementary notes. It is a model of the system's functionality and environment, and the primary input to later artifacts such as System Sequence Diagrams, Domain Models, and operation contracts.
A use case therefore is not one diagram oval plus a paragraph; it is the full bundle of paragraphs that together describe every important way the goal can play out.
6.1.2 Functional Requirements Through Use Cases
Functional requirements, not feature lists. In the FURPS+ classification, use cases primarily capture the F — functional or behavioral requirements — what the system does in response to actor actions. They can also touch usability or other quality concerns when those concerns are tightly tied to a use case, but their core job is behavioral. Ivar Jacobson introduced use cases in 1986 to shift attention from "what the system has" to "who uses the system, what are their typical scenarios, and what do they value."
Why did the industry move away from feature lists? A feature list says what without who or when. "System shall support login," "System shall support payment," "System shall print receipts" gives no order, no interaction, and no visible value test. Teams using such lists frequently reached the final demo only to hear "this is not what we wanted," because the customer's real context — the sequence, the data needed at each step, the error handling, the business outcome — was never written down. That pattern is near the top of causes for project failure when user involvement stays shallow.
Use cases fix this by writing the requirement as a story in context. They ask the more user-centric question set: Who is using the system? What is their goal? What is a typical path, and what are the alternates? Because the story form is simple and familiar, domain experts themselves can write or review use cases, which keeps customers involved — the best defense against building the wrong system.
A crucial process idea travels with this: use cases are just-in-time and evolutionary. They are not written perfectly once at the start in a waterfall style. They are written when needed, refined step by step, and changed happily when a real need changes. The aim is to discover requirements in a convenient, iterative format rather than to freeze them. In the Unified Process this means in early iterations only a small slice of use cases is written in brief form, and elaboration adds detail incrementally based on feedback from early programming and demos.
| Feature list | Use case |
|---|---|
| Lists "what the system has" | Describes "how an actor uses the system to reach a goal" |
| No order or interaction | Ordered steps: actor action, system validation, state change |
| Value hidden | Value explicit: observable result of value at the end |
| Hard for customers to validate | Written as a plain story customers can read and correct |
| Reviewed at the end, often too late | Refined iteratively, with early feedback after each timeboxed iteration |
When to pick which: Feature lists have a place as high-level vision or backlog markers, but never as the contract for what to build. Whenever you need agreement on behavior, write the story.
6.1.3 Success and Failure Scenarios Together
Every use case contains a Main Success Scenario (also called the happy path or basic flow) — the typical unconditional path where everything goes right — and a set of Extensions (also called alternate or alternative flows) that describe success variations and failure handling branched from specific steps of the main flow. Both kinds belong in the same use case because they share the same goal.
Worked example — Pay by Credit Card (goal: pay and confirm order). Consider the use case Handle Payment whose stakeholder goal is "customer pays and order is confirmed."
Main Success Scenario (happy path):
- Customer arrives at checkout with goods to purchase.
- Cashier starts a new sale.
- System records each sale line item and presents the running total.
- Cashier tells the total and asks for payment.
- Customer chooses credit and enters credit account information.
- System sends a payment authorization request to the external Payment Authorization Service and requests approval.
- System receives approval, signals approval to the Cashier, records the payment, and presents the receipt.
- Customer leaves with goods and receipt.
Extensions (branched from the steps above):
- 6a. Card declined — System receives payment denial: System signals denial to Cashier; Cashier asks Customer for alternate payment (cash, debit, wallet) or to cancel the sale.
- 6b. Network error — System detects failure to communicate with the Payment Authorization Service: System signals error, offers retry or alternate payment; if retry fails, Cashier may cancel.
- 5a. Wrong password or wrong OTP — System validates and rejects the credential: System signals authentication failure, prompts for re-entry up to a limit, then offers alternate payment or cancel.
- At any time, Customer cancels — System reverts or voids the sale and returns to ready state.
Sense-check: Success and each failure leave the system in a known state — either sale is saved with payment recorded, or no sale is saved and inventory is untouched. No scenario leaves money moved halfway. That testable end state is what makes the use case complete.
The sense-check matters precisely because writing the failures alongside the success forces the team to decide the system's responsibility when things go wrong, not only when they go right.
Extensions typically outnumber the main flow in thorough writing. That is expected: the combination of happy path plus extensions should satisfy nearly all stakeholder interests for that goal.
Assumptions & Scope — when this idea applies and when it does not. A use case collection applies whenever a primary actor has a goal that yields an observable result of value. It assumes:
- There is an identifiable primary actor who initiates the interaction to get value.
- The goal is at user-goal level (roughly an elementary business process) — it completes measurable work in one sitting, not a tiny sub-step.
- The system boundary is known enough to say what is inside (system responsibilities) vs. outside (actor responsibilities).
Where it breaks: if the need is not actor-goal driven (e.g., pure technical housekeeping like "re-index the database nightly" with no direct actor goal) it is better recorded as a technical report, constraint, or supporting use case rather than forced into a user-goal use case. Likewise, behavior that benefits no identifiable actor adds no value and should not be built.
Visual intuition: picture a tree diagram. The trunk is the Main Success Scenario, vertical, from trigger at the top to observable value at the bottom. At each step, small branches shoot off — labeled 3a, 3b, 5a, *a — each branch is an extension. Most runs travel the trunk (80 to 90% happy-path traffic), but the branches show every important detour. A good use case balances the trunk and the branches: the trunk is written first and is condition-free; the branches carry all the "if this happens" logic.
Pitfalls.
- Writing only the happy path. Teams often stop at the success story. Missing the failure branches guarantees surprises in testing and in production when cards are declined or networks drop.
- Confusing a scenario with a use case. "Card declined handling" is not a separate use case; it is one alternate scenario inside the broader Handle Payment or Process Sale use case that shares the same goal and the same preconditions and success guarantee.
- Feature-speak instead of story. "System shall have payment feature" does not say who initiates, what order steps occur, or what receipt the actor sees. Always show the interaction order.
6.1.4 Why Stories Work
Use cases are deliberately plain-text stories. The plainness is strategic. Researchers learned that domain experts disengage when analysis methods wrap simple ideas in layers of formalism; customers help most when the format is one they already understand. Stories are that format.
Q and A — login feature versus use case.
Q: How does a use case differ from a stakeholder request like "we want a login feature"?
A: The stakeholder says "we want a login feature" in business language — what they want at a high level. "Store the credentials in a database and hash the password" is one possible how — a design choice. A use case stays at the what level and avoids technical detail. It shows the interaction that gives value: the actor identifies self, the system authenticates, access is granted or a clear denial with reason is returned. Whether storage is a database, a file, or a cloud service is left for design, so the requirement remains technology independent (essential style) and reviewable by non-technical stakeholders.
Real-world and domain connection: The switch-case analogy helps teams model any multi-path goal — login, payment, checkout, enrollment — as one use case with branches, rather than inventing a separate use case per branch. In commercial systems such as POS (Process Sale in the NextGen case study), the Handle Payment sub-behavior itself is factored out precisely because card, cash, and check are alternates within the same payment goal. In agile projects this story form becomes the backbone for iteration planning: teams pick the most architecturally significant and high-value stories first and refine them just enough to build and get feedback.
Recap + Bridge. A use case is a collection of related success and failure scenarios that together tell how an actor achieves one goal through a system. Feature lists name features; use cases show interaction and value — which is why Jacobson's idea, introduced in 1986, spread so widely. With the what — a story that customers can validate — clear, the next discipline is to say where the system ends and the actors begin, so every story knows its stage.
Exam note: Be ready to explain, with a concrete comparison, why feature lists led to many failures (no context, no interaction order, no visible value) and how writing the requirement as a story in context addresses that. A good answer names an actor, a goal, one happy path, and at least one failure scenario that leaves the system in a testable end state.
6.2 System Boundary and the Black-Box View
6.2.1 Boundary and Scope
Hook — What are you actually building? A retail client says "we need a POS system." Does that include the cash drawer hardware, the tax calculator, the accounting system, the payment network? Until you draw a line, every conversation drifts.
Choosing the system boundary is choosing scope. Inside the boundary is the system under discussion (SuD) — the software (or hardware plus software) you will design. Outside are actors — people, organizations, external software services, or devices that interact with the system. Defining the boundary is therefore defining what you will build and what you will treat as given.
In the NextGen POS case study the boundary is drawn around the POS application itself. The Cashier, the Customer, the Payment Authorization Service, the Tax Calculator, and the Inventory and Accounting systems sit outside. Payment authorization is not within the boundary; there is an external actor that provides it. That one decision alone determines which responsibilities appear in use case text and which are delegated to an interface.
Boundary choices are clarified by asking "who is outside?" List external primary and supporting actors; the boundary then becomes the rectangle that encloses the system and excludes those actors. If the scope broadens to "hardware plus software as a unit" or to "an entire organization," the same technique applies, only the rectangle expands or contracts.
System boundary and scope. Scope is the set of capabilities enclosed by the boundary. Anything inside must be specified by system responsibilities; anything outside is assumed to exist and is accessed through an external interface or protocol. Changing the boundary changes the requirements: move the payment service inside and you now own authorization logic; leave it outside and you own only the request and handling of its response.
6.2.2 Black Box Thinking
Intuition — the opaque box. Picture a sealed box with input slots and output slots. You can push an item identifier in and see a price and running total come out, but you cannot open the box to see gears inside. That is exactly how use cases treat the system at requirement time. The same intuition carries to testing: in black-box testing you supply input, observe output, and make no claim about internal code.
The system is treated as a black box — its inside is not seen while writing requirements. Use cases describe responsibilities of the system as a whole, not the collaboration of its internal parts. "A sale is recorded" is a responsibility of the black box. Whether that recording touches a database, a file, or a cloud store, which table, which SQL statement, which framework — none of that belongs in the use case. It is how the box does the job, decided later during design. Keeping the description at the level of responsibilities preserves implementation freedom and keeps requirements understandable to non-technical stakeholders.
This focus on responsibilities is intentionally aligned with object thinking. An often-quoted line is that software elements have responsibilities and collaborate with others that have responsibilities. At the system level, the whole POS has the responsibility to "log the completed sale." Later, during object design, that responsibility will be decomposed and assigned to collaborating objects such as Register, Sale, ProductCatalog, and external service adapters.
For object-oriented work this view is natural: externally the system offers a set of functionalities to its actors; internally you will do a lot of work to deliver those functionalities, but the actors need not see that detail at requirement time.
6.2.3 Separating What From How
A practical editorial test while writing: does this sentence say what happens or how it happens?
Worked example — saying what versus saying how.
- What (correct for a use case): "The system records the sale." "The system presents the total with taxes calculated." "The system signals approval to the Cashier and releases the cash drawer."
- How (incorrect for a use case — belongs to design): "The system writes the sale to a MySQL table sales with JDBC." "The system generates a SQL INSERT statement for the sale." "The system calls the TaxEngine.calculateTax() singleton via RMI."
The first column states an observable outcome that any stakeholder can verify. The second column locks in a technology choice that may change and that a business stakeholder cannot judge. Use cases stay in the first column. A design document later will choose MySQL versus a file, JDBC versus JPA, local versus cloud — but the requirement does not.
Sense-check: Read the use case without knowing the implementation stack. If a product owner, a cashier, and a developer all agree on what success looks like, the wording is at the right level.
A helpful mental picture for the team is the rectangle with the system name in a use case diagram. That rectangle is the box. The ovals inside are responsibilities the box must fulfil (Process Sale, Handle Returns). The stick figures outside are actors. Lines between actor and oval mean "this actor is involved in this responsibility." No line suggests Actor–Actor interaction — that detail belongs to the use case text, not the picture. Keeping the diagram and the what/how discipline together prevents drifting into architecture during requirements workshops.
Assumptions & Scope — boundaries of black-box thinking. Black-box writing assumes:
- The system's external interfaces can be named without designing them (e.g., "Payment Authorization Service" is a named external system with a request/response protocol).
- Stakeholders care about inputs and observable outputs, not internal structure.
It breaks down if you need to specify internal decomposition for regulatory or safety reasons, or if the system's internal architecture is itself a deliverable (e.g., a persistence framework). In those cases, supplement black-box use cases with white-box or subfunction-level use cases that explicitly describe internal collaboration — but keep the two levels distinct so readers know which view they are reading.
Visual intuition: imagine a use case diagram as a stage poster. A bold rectangle center stage is labeled "NextGen POS." Inside, ovals read Process Sale, Handle Returns, Process Rental. On the left margin, a stick figure labeled Cashier (primary actor, near the top-left, consistent with Western reading order) reaches toward Process Sale. On the right margin, figures labeled Payment Authorization Service and Tax Calculator reach back. The line between Cashier and Process Sale has no arrowhead — implying two-way talk: the Cashier gives item identifiers and receives totals and receipts. A one-way arrow would mean passive receipt, but the default is bidirectional. The takeaway in one line: the picture answers "who talks to what," while the text answers "what is said, in what order, to what outcome."
Pitfalls.
- Writing solution language into requirements. "Insert into MySQL" or "generate a SQL INSERT" feels precise but couples the requirement to one technology and hides the real test — did the sale get recorded and can it be retrieved? Prefer "sale is saved."
- Confusing boundary decisions with requirements. Debating whether payment authorization lives inside or outside the system is a scoping conversation to have explicitly. Burying that decision in a sentence ("the system authorizes payment") without naming the Payment Authorization Service as an external actor leaves scope ambiguous.
- Treating the diagram as the requirements. Novices over-invest in ovals and relationships and under-invest in text. The diagram is a table of contents and a context picture; the behavioral contract lives in the steps and extensions.
Q and A — what does black box mean?
Q: What is meant by a black box when talking about use cases?
A: It means we define the system only by its inputs, outputs, and the list of functionalities it must provide — stimulus and response — without describing internal steps. The user provides an item identifier, the system presents a price and running total. How the system looks up that price (catalog, cache, remote service) is not described. The inside is worked out later during design, but the requirement is written as if the system were opaque. This separation is sometimes summarized as analysis = what, design = how.
Real-world and domain connection: In retail, banking, and e-commerce checkout alike, the black-box discipline is what keeps business rules reviewable by the people who own those rules. A supermarket manager can validate "the system collects tax correctly" without reading Java or SQL, and an auditor can trace liabilities to recorded sales without knowing the persistence technology. Teams that hold the line on what versus how also keep the door open for technology change — moving from on-prem databases to cloud stores does not require rewriting the use cases.
Recap + Bridge. System boundary defines scope; treating the system as a black box defines behavior as externally visible responsibilities, separating what the system must do from how it will do it — the same separation that later makes responsibility assignment to objects meaningful. With the stage and the rule ("show the play, not the wiring") in place, the next question is who stands outside the box and why they care.
Exam note: In writing tasks, avoid any technical detail. "The system records the sale" is correct; "the system inserts into the database with a JDBC call" is not expected. Be able to spot the what/how error in a given sentence and rewrite it in essential, black-box style.
6.3 Actors, Stakeholders, and Goals
6.3.1 Who Is an Actor
Hook — Why talk about people before talking about code? Two cashiers argue: one wants faster scanning, the other wants simpler returns. If you record only "the system should support sales," whose goal did you capture — and whose did you silently miss?
An actor — anyone or anything outside the system that interacts with it by initiating events, providing input, receiving output, or doing both — is defined as a role, not a single person or job title. "Cashier" is a role. Any individual who acts as cashier at a given moment fills that role. The same person may fill different roles at different times (cashier now, supervisor later), and one role may be filled by many people. Actors are external by definition: they sit outside the system boundary, even when the actor is software or hardware. The system under discussion itself can appear as an actor when it calls upon services of other systems.
A stakeholder is a broader set: anyone with an interest in the system, even if they do not directly interact with it. All actors with goals are stakeholders, but not all stakeholders are actors. Owners, security officers, maintenance teams, and downstream systems that consume sales data later all care about the outcome. Listing stakeholders and their interests — "who cares and what do they want?" — is the methodical check that prevents missing a goal. Without it, a responsibility like "salesperson commissions updated" can be overlooked until late, because the salesperson never appears on screen but still has a stake in every sale.
Actor, stakeholder, and role. Precise use:
- Actor — external role that exchanges information or triggers behavior with the system.
- Stakeholder — anyone with an interest in the system's behavior or outcomes.
- Role — the capacity in which a person or system acts, which decides which goals and permissions apply. Actors should be named with singular, domain-relevant nouns that describe the role: Customer, Cashier, Payment Authorization Service. Avoid job-title hierarchies like Junior CSR versus Lead CSR when a single role Customer Support covers the interaction.
6.3.2 Primary and Secondary Actors and Notation
Three kinds of actors appear in relation to the system under discussion:
- Primary actor — has user goals fulfilled through using services of the system. The primary actor initiates the use case to get something of value. Example: Cashier for Process Sale. Identify them to find the goals that drive use cases.
- Supporting (secondary) actor — provides a service (for example, information or validation) to the system while the primary actor's goal is being pursued. Often a computer system, but can be a person or organization. Example: automated Payment Authorization Service, Tax Calculator, Inventory System. Identify them to clarify external interfaces and protocols.
- Offstage actor — has an interest in the behavior of the use case but is not primary or supporting during that use case. Example: Government Tax Agency that wants tax collected on every sale. Identify them to ensure subtle interests are not missed.
By UML convention, primary actors are drawn on the left of the system boundary and secondary/supporting actors on the right — often with a <<actor>> or <<system>> stereotype to distinguish software systems from people. In Western reading order this puts the driver of the story where the eye starts. The notation is a secondary concern; the meaning — who benefits and who helps — is primary. Place the most critical primary actors and their critical use cases toward the top-left to improve scanability, and stack use cases to imply timing only loosely (top tends to occur earlier).
On the association line between actor and use case, arrowheads deserve care. When no arrow is shown, communication is understood as two-way — the actor both gives input and receives output. Cashier connected to Process Sale with no arrow implies the cashier both gives product and payment details and receives receipt, change, and error information. A directed arrow signals one-way initiation, but many modelers avoid arrowheads unless the passive nature of an actor is essential, because arrows are often misread as data flow (as in a data-flow diagram) rather than invocation. Associations mean "this actor is involved with this use case," not "data flows this way."
Actors also link to events. Each event the system must handle — enter item, make payment, request authorization — comes from somewhere, and that somewhere is an actor with a goal. Writing an actor-goal list (actor → goal) is therefore a direct path to finding use cases: list actors, write what each wants to achieve with the system, and turn each goal into a candidate use case.
6.3.3 Goals, Observable Results, and State Change
Goal levels and observable value. Jacobson's RUP definition carries two subtle tests: a use case must be initiated by an actor and must produce an observable result of value to that actor — a sequence of actions that yields a testable business outcome. If no value is added, there is no reason to build it.
This connects use cases directly to business processes, which always have business outcomes. "Process Sale" ends with sale recorded, tax calculated, receipt generated, accounting and inventory updated — outcomes a business stakeholder can name and test. The guideline extends to naming: a use case should be named with a strong verb in domain language — Withdraw Funds, Enroll Student, Process Sale — rather than weak, technical verbs like Process Transaction that reflect a developer view rather than a user goal.
Two ways to phrase the same rule are used in the Unified Process and in Cockburn's writings, and both point to the same check:
- User-goal level — corresponds roughly to an elementary business process (EBP): a task done by one person, in one place, at one time, in response to a business event, that adds measurable value and leaves data in a consistent state.
- Observable result of value — the actor can see that the goal is done and judge success or failure.
The worldview behind this is state-transition thinking, articulated in the lecture as "the world is always moving from one state to another." Each use case moves the system — and the business — from one consistent state to another consistent state, triggered by events. After six months you hold a different employment position; after a sale, the stock level and cash drawer position are different. Events are the triggers; the transition is the work; the consistent end state is the guarantee.
Worked example — what counts as a goal and a state change.
- Is "scan item" a use case? No. Scanning an item alone yields no observable value outside a larger sale; it is a step within Process Sale. It does not satisfy the "value plus consistent state" test.
- Is "Process Sale" a use case? Yes. Its observable results include: sale is saved, tax is correctly calculated, inventory and accounting are updated, receipt is generated. The state change is atomic in the business sense — stock reduced by the purchased quantities, cash or credit settlement recorded — and it is triggered by the event "customer arrives at checkout with goods."
- Intermediate states may be inconsistent, end states must be consistent. During a sale, for a short time the running total is incomplete. That is expected. The contract is that by the end of the use case the system is back in a consistent state.
Q and A — observable result of value.
Q: Can you give an example of an observable result of value?
A: Think of leaving a service desk with a clear outcome. For payment, the observable result is not "payment processed" in vague terms, but "payment accepted and order confirmed" with a receipt you can show for a return, or a named failure reason such as "card declined due to network error" with guidance on what to do next. That clarity is what makes the use case testable and what links it to a business process: you can point to the receipt, the updated inventory, and the accounting entry and say done.
Q and A — leaves data in a consistent state.
Q: What does "leaves data in a consistent state" mean? Give an example.
A: It means after the use case finishes, data must be correct and in balance — not half-done. The lecture's canonical example is a bank transfer between two accounts. During the transfer, for a short interval the total money across the two accounts may appear inconsistent because a debit has been posted but the matching credit has not yet been recorded. When the process ends, the system must be back in a consistent state: either the transfer is fully recorded in both accounts or it is rolled back entirely, with no money lost or doubled. If the system remained in an inconsistent state, no further work could safely proceed. The same idea applies to a POS sale: by the end, stock, cash, and accounting are reconciled; you do not have stock reduced without payment recorded.
Assumptions & Scope. The goal/value/state view assumes:
- Business value can be observed and tested by a stakeholder (a receipt, a recorded sale, a denied request with reason).
- Transactions are atomic at the business level — they either complete fully or are undone/reported, preserving invariants like "money is not created or lost."
Where it needs extension: some legitimate needs are not actor-goal driven at user-goal level (e.g., regulatory reporting that copies data nightly, or infrastructure use cases). Those are recorded at other goal levels (subfunction) or in the Supplementary Specification, not forced into a user-goal use case.
Visual intuition: picture two snapshots of the world. Snapshot A (before): Account X has 500, Account Y has 300, total 800. An arrow labeled "Transfer 100, event: actor requests transfer" points to Snapshot B (after). In a correct execution, Snapshot B shows 400 and 400, total still 800 — consistent. In a failure with proper rollback, Snapshot B is again 500 and 300 — also consistent, with a failure reason returned. The inconsistent middle — 400 and 300, total 700 — is allowed only transiently, never as the final state exposed to actors.
Pitfalls.
- Confusing actor with job title. "Junior Cashier" and "Senior Cashier" as separate actors with identical links duplicate the diagram and couple it to HR policy. Model the role (Cashier, International Student) and handle seniority as a business rule or permission, not as distinct actors.
- Missing offstage stakeholders. Forgetting the Government Tax Agency or the Salesperson's commission interest is a classic omission that surfaces only when tax compliance fails or commissions are not paid. Start from stakeholders and interests before writing steps.
- Equating "value" with "something happened." Logging without visible outcome is not value. Ask: can the primary actor point to a tangible change (receipt, balance, enrollment confirmation) and say why it matters?
Real-world and domain connection: In the POS cashier-led sale, the Cashier drives the process (primary, left side), while the Payment Authorization Service and Tax Calculator help from the right (supporting, secondary). Placing them left versus right communicates the business arrangement at a glance: who benefits and who provides services. The same pattern recurs in banking, e-commerce, and university enrollment — a human primary actor on the left, system actors on the right — and the state-change guarantee recurs wherever money or inventory moves.
Recap + Bridge. Actors are roles outside the boundary; stakeholders are the wider set of interested parties; goals are what turn an interaction into something worth building, judged by observable value and a consistent end state. That state guarantee is not abstract — it is the same atomicity that databases and ledgers enforce. With who, why, and the value test clear, a hands-on way to feel how those responsibilities become objects is to put cards in people's hands.
Exam note: Be able to justify observable value and consistent state with a concrete example such as a bank transfer. The phrase "leaves data in a consistent state" should be argued with before/after balances and the rollback condition, not with vague wording.
6.4 CRC Cards — An Informal Way to Learn Object Orientation
6.4.1 Class, Responsibility, Collaborator
Hook — Can you feel object orientation in half an hour without writing code? Kent Beck and Ward Cunningham thought you could — with index cards, not textbooks.
CRC stands for Class, Responsibility, Collaborator — a very informal, low-tech technique introduced in 1989 by Kent Beck and Ward Cunningham (and others) to teach object orientation itself, with no heavy theory. The physical artifact is a small card, about four by six inches — postcard size — divided into three compartments: the Class name at the top, its Responsibilities listed below on the left, and the names of Collaborator classes it needs to fulfill those responsibilities on the right.
- A class names a kind of object — a template or category (e.g., Sale, Register, ProductCatalog).
- Its responsibilities are the duties it must carry out — what it knows or does (e.g., "record sale line item," "calculate total," "log completed sale").
- To meet those responsibilities it often needs help from other classes; those helpers are its collaborators — other cards it talks to (e.g., Sale collaborates with SalesLineItem and ProductSpecification).
Class versus object — a frequent confusion. A class is the template or description; objects are the instances created from that template at runtime. In CRC discussions people often use the words loosely while pointing at the card — "this Sale object does X" — but the card always names the class. One Sale class can have many Sale objects over time, each holding a different set of line items.
The card's size is intentional. Four by six inches forces brevity: if responsibilities no longer fit on one card, that is a design smell that the class is doing too much and should be split. The collaborator list on the side makes coupling visible at a glance — a card with many collaborators is highly connected and may need simplification.
6.4.2 The Workshop: Acting Out Scenarios
Intuition — office roles. In an office, each role has defined duties and must work with other roles to get a job done. The cashier handles the customer, the stock clerk handles inventory, the accountant handles ledgers. No one person does everything alone. Software objects work the same way: a set of objects that work together and ask each other for help to reach a goal. CRC cards make that collaboration tangible by turning each role into a person.
The real power of CRC is the workshop — an interactive role-play, not a diagramming exercise. A group of five to six people each holds one or more cards and plays the role of that class. A use case scenario — ideally a concrete path through Process Sale — is read aloud step by step. The person holding the relevant card says, "In this step I will do this." The next person says what they will do in that scenario, and so on. Each line of the scenario maps to a responsibility on some card, and the dialogue makes explicit where one object calls another for help.
It is both serious and playful. Observers and documenters stay nearby to record requirements as they appear. The "play on stage" turns an abstract design into lived interaction: objects talking to each other, passing data, asking for services. Gaps become obvious in the acting — if no one steps forward for a line ("who calculates tax?"), a missing responsibility or a missing class has been spotted before any code is written.
Worked example — Process Sale trace with CRC cards. Scenario: Cashier enters item identifier 12345.
- Cashier announces "enterItem(12345, qty 1)" — the Register card (held by person A) steps forward: "My responsibility is to coordinate the sale; I will ask ProductCatalog for the specification."
- Person B holding ProductCatalog says "I know the catalog; I will return ProductSpecification for 12345 (price 50, description veggie-burger)."
- Person A (Register) says "I will tell Sale to add a line item."
- Person C holding Sale says "I will create a SalesLineItem for that spec and quantity; my collaborator is SalesLineItem."
- Person D holding SalesLineItem says "I hold quantity and link to the spec."
- Back to Sale: "I will compute the running total and present it."
Continue the dialogue through "makePayment" and "makeGiftCertificatePayment" variations — each alternate scenario reveals a new collaborator or a new responsibility. Where the conversation stalls, the team adds a card or reassigns a duty.
Sense-check: Every scenario step should be owned by exactly one card, and every card should be needed in at least one scenario path. Cards with no lines are suspects; lines with no card are gaps.
6.4.3 Why This Helps
Why an informal method teaches the core of OO. Object orientation is not syntax. It is the idea that a system is a set of objects, each with duties, working with others across scenarios. CRC captures that core without requiring UML or tools.
The method was built to teach that idea in about half an hour. Half an hour of standing up, holding cards, and walking through the scenarios that belong to the use cases gives a felt sense that no one class can do all the work alone. Each class owns duties and asks collaborators for support. That felt sense is the design.
Beyond teaching, CRC is a practical early analysis tool. By acting through the scenarios that belong to the use cases, the team spots missing responsibilities, missing classes, and missing helpers early — before diagramming and before coding. It is low-cost, requires only index cards and a table, and can be run with both developers and client-side stakeholders (e.g., cashiers, sales managers) in the room, so domain knowledge enters the design conversation directly. The NextGen case study team is encouraged to read a short guide on CRC and try a small role-play for POS or rental workflows.
Assumptions & Scope — when CRC excels and when to move on. CRC assumes:
- The team can enumerate meaningful scenarios from use cases (even brief ones) to walk through.
- Roles map loosely to candidate classes — a reasonable starting heuristic, though not a guarantee of the final class design.
It excels for learning OO, for early responsibility discovery, and for aligning business and technical participants. It is not a substitute for detailed design techniques (interaction diagrams, class diagrams, GRASP assignment) once responsibilities stabilize. Treat CRC as the first rough sketch of who does what, then refine with more precise UML and contracts.
Visual intuition: picture a table with six people standing, each holding a white index card at chest height. The card tops read Sale, Register, ProductCatalog, SalesLineItem, ProductSpecification, Payment. Below each title, two columns: Responsibilities on the left, Collaborators on the right. A facilitator reads "Cashier enters item 12345." The Register holder steps half a step forward and points to ProductCatalog. The network of pointing gestures during the walk-through is itself a diagram — a living interaction diagram — showing coupling and collaboration density without drawing a single UML line.
Pitfalls.
- Keeping the same tiny deck for the whole system. CRC is for discovering responsibilities for the current iteration's use cases, not for designing the entire system at once. Trying to card the whole POS in one sitting leads to overload.
- Confusing class with instance. Saying "the Sale object is the card" rather than "the Sale class card describes the category whose objects will do this work" can blur the later transition to instance-level interaction diagrams. Hold the distinction lightly but keep it.
- Ignoring the size signal. If a card's responsibility list overflows the four-by-six space, that is feedback. Split the class rather than writing smaller.
Q and A — how common is CRC and what does it have to do with OO?
Q: How many people know CRC cards? What is it and how is it related to object orientation?
A: CRC remains the most hands-on way to feel what object orientation means, especially for newcomers. Hold a card, take a scenario, and act it. You see immediately that no one class can do all the work alone. Each class owns duties and asks collaborators for support. That acting is the design in miniature — the same responsibility-driven thinking that later becomes System Sequence Diagrams, operation contracts, and GRASP assignment. Even teams that later model in sophisticated tools often start with CRC because it surfaces collaboration and responsibility distribution faster than drawing.
Real-world and domain connection: Running a CRC session with developers and client stakeholders for a point-of-sale or a rental workflow makes gaps visible before code is written and before time is spent polishing diagrams that encode the wrong responsibilities. The technique is tool-agnostic and has been reused across retail, university enrollment, and banking domains wherever early OO learning and lightweight responsibility exploration are needed.
Recap + Bridge. A CRC card shows a class, its responsibilities, and the collaborators it needs; a CRC workshop walks through use case scenarios with people playing those cards to discover who does what. The informality is the point — it teaches collaboration over syntax and seeds later, more precise design. With a felt sense of objects and their duties, the next step is to write the stories that drive them — the formats and templates that make a use case complete.
Exam note: Be ready to expand the CRC acronym, state the physical size and three compartments, name Kent Beck and Ward Cunningham and the year 1989, and explain the workshop flow in one paragraph — who holds cards, how a scenario is read, and how gaps are spotted.
6.5 Writing Use Cases — Formats and Templates
6.5.1 Different Formats Teams Use
Hook — Stories are enjoyable to read, hard to write. How do you make a hard thing easy? The same way you make essay writing easier: give people a template and a word limit.
Teams choose among several widely used forms and pick what suits the project's maturity and risk. All forms share one purpose — to record the main success scenario and its alternates as ordered stories — but they differ in weight:
- Brief format — a terse one-paragraph summary of the main success scenario. Written in a few minutes during early requirements brainstorming to get a quick sense of subject and scope. Test: if you cannot write that paragraph, the use case is not yet clear enough.
- Casual format — an informal paragraph format with multiple paragraphs covering the main success scenario plus a short list of alternate scenarios. Also quick to produce; suitable for early workshops when many use cases are being sketched.
- Fully dressed format — all steps and variations are written in detail, with supporting sections such as preconditions, success guarantees, stakeholders and interests, and extensions. Typically two to three pages per use case and not more. Used after many use cases have been identified in brief form, when the architecturally significant and high-value ones (perhaps 10% in the first workshop) are selected for deeper elaboration. Page 68 of the widely used Larman text shows the canonical example; study one or two fully dressed examples there.
- Two-column / conversational format — actors' actions on the left, system's responsibilities on the right (first promoted by Rebecca Wirfs-Brock and by Constantine & Lockwood). The visual separation aids usability analysis. Functionally equivalent to one-column; choice is stylistic.
- Interaction format — strictly stimulus and response: 1. Actor does X, 2. System responds Y, 3. Actor gives Z, 4. System does W. Each step is an event that moves the system to a new state, making the trigger–response chain explicit.
- Step-by-step or pseudocode — a simple algorithm-like listing of steps, sometimes using alternate markers such as 3a or 3b for branches at a specific step. Useful when the flow is highly branched.
Choice of format is a company or project preference; it is not a correctness issue. What matters is that main success and alternate paths are both recorded in some form and remain readable to business stakeholders. Cockburn's template (available since the early 1990s at alistair.cockburn.us) is probably the most widely shared fully dressed template.
Assumptions & Scope — when to use which. Brief and casual suit early ideation and scoping — low ceremony, fast coverage. Fully dressed suits high-risk, architecturally significant workflows where precision about preconditions, success guarantees, and extensions prevents costly rework. Over-using fully dressed for every use case too early is a waterfall trap; under-using it for critical flows is a quality risk.
Essential versus concrete style. Regardless of format, write in an essential style — keep the user interface out and focus on intent. Essential style expresses the narrative at the level of actor intentions and system responsibilities: "Administrator identifies self. System authenticates identity." Concrete style embeds UI decisions: "Administrator enters ID and password in dialog box (see Picture 3). System displays the edit users window." Concrete language is useful later for detailed GUI design, but it clutters early requirements analysis and locks in technology choices. All prior examples in this lecture aim for essential, black-box wording.
6.5.2 Template Elements
A common fully dressed template — synthesizing Cockburn and Larman — includes these headings. Some are mandatory for clarity; others are optional depending on scope:
| Section | What it holds | Required? |
|---|---|---|
| Use Case Name | Verb + noun in domain language (e.g., Process Sale) | Mandatory |
| Scope | System under design (e.g., NextGen POS application) | Noteworthy if scope could be ambiguous |
| Level | user-goal (an EBP) vs subfunction (a reusable sub-step) | Helps readers know the grain |
| Primary Actor | Calls on the system to deliver its services | Mandatory |
| Stakeholders and Interests | Who cares and what do they want? Bounds what belongs in the use case | Very important — more practical than it first appears |
| Preconditions | What must be true on start, and worth telling the reader | Include only if non-obvious |
| Success Guarantee (Postconditions) | What must be true on successful completion, and worth telling — meets needs of all stakeholders | Include for the end-state contract |
| Main Success Scenario (Basic Flow) | Typical unconditional happy path, step by step | Mandatory — at least one paragraph/flow |
| Extensions (Alternate Flows) | Alternate scenarios of success or failure, branched by step | Expected — often the longest section |
| Special Requirements | Related non-functional requirements (performance, usability, rules) | Optional; often consolidated in Supplementary Specification |
| Technology and Data Variations List | Varying I/O methods and data formats (UPC/EAN/JAN/SKU, card reader vs keyboard) | Optional but useful for I/O constraints |
| Frequency of Occurrence | How often this use case runs — influences investigation and timing | Optional; informs ranking |
| Open Issues | What is still uncertain | Optional |
Why Stakeholders and Interests is the most important preface. The contract view states: the use case captures all and only the behaviors needed to satisfy stakeholders' interests. By starting with that list — Cashier wants accurate fast entry, Salesperson wants commissions, Customer wants visible prices and proof of purchase, Company wants recorded receivables and fault tolerance, Manager wants override, Government Tax Agencies want tax collected, Payment Authorization Service wants correct protocol — you have a method to derive what must be in the remaining sections, rather than relying on memory. Missing the salesperson interest is how commission handling is missed.
Preconditions state what is assumed true before the scenario begins — they are not tested within the use case. "Cashier is identified and authenticated" implies a prior successful Login scenario. Do not write noise such as "the system has power." Success guarantees state what must be true on successful completion of any path that claims success — Sale is saved, Tax correctly calculated, Accounting and Inventory updated, Commissions recorded, Receipt generated.
The Main Success Scenario is the "happy path," often written without conditions or branching; defer condition handling to Extensions. Steps come in three idiomatic kinds: (1) an interaction between actors, (2) a validation (usually by the system), (3) a state change by the system (recording or modifying something). Idioms include capitalizing actor names and indicating repetition ("Cashier repeats steps 3–4 until indicates done").
Extensions carry the bulk of the text in thorough cases. An extension has two parts: the condition and the handling. Write the condition as something detectable by the system or an actor: "System detects failure to communicate with external tax calculation service" is better than "External tax calculation system not working" because the first names a signal the system can actually test. Label extensions relative to the main flow: 3a, 3b for alternates at step 3; 3–6a for a range; a, b for "at any time" asynchronous events such as manager override or system failure.
Special Requirements and Technology Variations deserve explicit placement. Placing "credit authorization response within 30 seconds 90% of the time" with the use case keeps it near the flow it constrains, though many teams later consolidate non-functional items in the Supplementary Specification for architectural analysis.
6.5.3 How Much Detail
How long is enough? Just-in-time and not too much. Record enough to build the current increment. A fully dressed description that runs two to three pages is sufficient; making the document very large adds little value. The just-in-time principle says: do not try to cover every possible detail in one attempt — it will change tomorrow. Capture what the stated problem needs and extend later when a real change appears. Capturing too much is a sign of overthinking. Conversely, do not invent requirements that were not stated; if something is missing and truly needed later, it can be added.
Keep language simple, actor-centered, and testable. Avoid technical terms tied to implementation. Show a clear start and a clear end, just as a flowchart shows start and end with a sequence and branches inside. Use cases are also described naturally as events and state changes — each step is an event that moves the system to a new state. Listing every event the system must support is a good completeness check.
The iterative and evolutionary caution from the early chapters applies directly: writing all use cases in detail before the first development iteration is a classic waterfall misunderstanding, not a healthy UP or agile project. In a well-run cycle, a few critical use cases are written in detail, designed and built in a timeboxed iteration, demonstrated to stakeholders, and then refined. Written specifications give the illusion of correctness; only code and tests reveal what is truly wanted and what works.
Visual intuition: imagine a one-page template poster on the wall. Across the top, boxes for Name, Scope, Level, Primary Actor. Down the left, a tall column for Stakeholders and Interests. In the middle, the Main Success Scenario runs as a numbered spine from 1 to 10. To its right, a dense forest of branches labeled 3a, 3b, 5a, 7b, *a — the Extensions — shooting off that spine. Two smaller boxes at the bottom hold Special Requirements and Technology Variations. The poster communicates the same message as the Larman page-68 example: the spine is the contract's heart, the branches are its reality, and the top boxes are its boundaries.
Pitfalls.
- Over-documenting. A twelve-page use case is almost always a sign of premature completeness rather than quality. Two to three pages, with the rest left for iterative discovery, is the realistic aim.
- Concrete UI creep. "Enter ID and password in dialog box (see Picture 3)" feels helpful but binds the requirement to one UI. Keep it essential until UI design proper begins.
- Inventing missing requirements. If the case study does not say the system must support fingerprint login, do not add it. Note it as an open issue rather than specifying it.
6.5.4 Cashier Example in Story Form
Worked example — cashier swipes product (UPC scan) in three renderings.
Casual story form (the tone stakeholders read):
- Cashier swipes the product across the scanner.
- Scanner reads the UPC code.
- System looks up price and description from the Product Catalog.
- System shows line total and running total including taxes.
- Cashier repeats for next product or signals end of entry.
Notice that even this short form names the actors (Cashier, Scanner as device actor, System), the stimulus and the response, and where a failure can occur (UPC not found).
Actor–System two-column rendering of the same story:
| Actor Action | System Responsibility |
|---|---|
| Cashier swipes product. Scanner reads UPC. | Records sale line item; presents item description, price, running total. Price calculated from price rules. |
| Cashier repeats entry until done. | Presents total with taxes calculated. |
Extension handling for the same story:
- 3a. Invalid item ID (not found): System signals error and rejects entry. Cashier responds: manual entry of human-readable UPC, or price-on-tag manual entry with manager override, or Find Product Help to obtain true ID/price.
- 3b. Multiple of same category (5 packages of veggie-burgers, identity not important): Cashier can enter category identifier plus quantity.
- 5a. System detects failure to communicate with external tax calculation service: System restarts the service; if restart fails, signals error; Cashier may manually calculate and enter tax or cancel sale.
Sense-check: Each actor action has a matching system responsibility, the main flow is condition-free, and all conditional logic lives in extensions with a named handling path — exactly how the fully dressed example separates the happy path from the what-can-go-wrong catalog.
Q and A — file, database, or cloud?
Q: Should we describe file, database, or cloud storage in the use case?
A: No. Write what is recorded — for example "sale is recorded" and "sale is saved" — not how or where it is stored. Whether persistence is a relational database, a file, or a cloud store is a design decision that belongs to architecture and data modeling, not to the requirement story. Keeping the how out preserves essential style and black-box discipline.
Related idiom: Teams that write the Technical Variations list (e.g., "item identifier entered by bar code laser scanner or keyboard; identifier may be UPC/EAN/JAN/SKU") and the Technology list ("credit account entered by card reader or keyboard; signature captured on paper receipt but may be digital within two years") capture I/O flexibility without polluting the main flow with technology choices.
Real-world and domain connection: Many teams record extensions with labels like 3a, 4b to mark branches at a specific step of the main flow. This notation — shared between Larman, Cockburn, and tooling like AgroUML and StarUML — scales from a five-step casual sale to the deeply branched NextGen Process Sale on page 68 with its dozens of extensions for tax-exempt, price override, coupon, rebate, and printer-out-of-paper. The form stays the same; only the branch catalog grows.
Recap + Bridge. Formats range from a one-paragraph brief to a two-to-three-page fully dressed template with preface, main flow, extensions, and variations; the choice is about weight and timing, not correctness. With the anatomy of a well-written use case clear, the next practical questions are how to find candidate use cases, what names they should carry, and how to test whether a candidate deserves to be a use case at all.
Exam note: A template will be given and you will fill it. Expect to write at least the one-paragraph main success scenario without omission — that paragraph alone defines the use case's value. Keep the fully dressed rendering within two to three pages, name stakeholders and interests explicitly, and defer conditional logic to the Extensions section.
6.6 Finding and Checking Use Cases
6.6.1 How to Find Them
Hook — Where do use cases come from? No formula generates them. They come from asking the right two questions — who wants something, and what event are we responding to — and from walking the boundary looking for inputs and outputs.
Two practical methods stand out and are often used together in requirements workshops:
- Actor-goal list — the most popular starting point. List actors, write what each wants to achieve with the system, and turn each goal into a candidate use case. For NextGen POS, a fragment looks like: Cashier → Process Sale; Customer → Process Rental, Make Payment; Manager → Manage Users, Manage Security, Handle Returns; System Administrator → Shutdown, Startup. The procedure is: choose the system boundary, brainstorm primary actors (who has goals fulfilled through the system), identify each actor's goals, and define user-goal level use cases that satisfy those goals (usually one-to-one, with occasional exceptions).
- Event list — list every event the system must respond to, often organized with a state-transition view or a system event catalog, and link each event to the originating actor and the goal it serves. Events arise from human actions, time (Time as an actor for scheduled jobs), hardware sensors, or external system messages.
A third lens complements both: follow the system's inputs and outputs. If something must enter or leave the system for a purpose, ask which actor needs it and which goal it serves. "Sales data requested by the Sales Activity System" is an output that points to a use case driven by that remote system's goal.
The textbook stresses process honesty: finding use cases is an evolving discovery, not a one-time specification. Teams are advised not to stress about finding all use cases at once. Step through actors and events, capture what is clear, draw a quick actor-goal diagram, and let the rest appear as understanding grows through iteration demos and feedback. In the Unified Process, business and development participants (including the chief architect) do this together in timeboxed requirements workshops, picking the high-value, high-risk slice to elaborate first.
Helpful elicitation questions include: Who starts and stops the system? Who does system administration, user and security management, log retrieval? Is "time" an actor because the system does something on a schedule? Is there a monitoring process that restarts the system on failure? Who is notified on errors? How are software updates handled — push or pull? Who evaluates system activity or performance? In addition to human primary actors, are there external software or robotic systems that call upon services of the system? Each answer can surface an actor and a goal that would otherwise be missed.
Actor-goal versus event view. The actor-goal list answers "who wants what" and naturally yields user-goal use cases. The event list answers "what triggers the system" and ensures no stimulus is unhandled — including time-triggered and asynchronous events (labeled a, b in extensions). Both converge on the same set; using both reduces blind spots.
6.6.2 Naming and Scope
Name with intent. Name each use case with a strong verb plus a noun that shows action and signals the goal: Process Sale, Handle Returns, Process Rental, Manage Users, Manage Security. A verb reminds the reader that something is being done, not just a thing being named. Weak or technical verbs like "Process," "Perform," or "Do" in stakeholder language often signal a developer view that should be reworded into domain terminology — customers say "withdraw funds" more naturally than "process withdrawal transaction."
For each candidate use case, define its intent explicitly: what is the goal, why does it matter (which stakeholder interest it satisfies), where does it start, where does it end, and what is the happy path that covers 80 to 90 percent of real runs? If you cannot write a single-paragraph summary of that happy path, the candidate is not yet a true use case — it may be a step, a constraint, or a piece of background work that belongs inside a larger use case or in the Supplementary Specification.
A well-formed use case must also be started by a primary actor, must connect to at least one actor, and must give a complete description with start and end marked — just as a flowchart shows start and end with sequence and branches inside.
Assumptions & Scope — granularity. This method assumes you are looking for user-goal level stories (the EBPs). Very small interactions ("scan item") and very large business aggregates ("run the business") are out of scope as standalone user-goal use cases. Subfunction use cases exist but are justified by reuse or decomposition — not by splitting every step into its own oval.
6.6.3 The Elementary Business Process Check
A widely shared validity check is the Elementary Business Process (EBP) guideline, a term borrowed from business process engineering. It asks whether a candidate is a task that is:
performed by one person, in one place, at one time, in response to a business event, that adds measurable value and leaves data in a consistent state.
Most valid user-goal use cases pass this test, though a few legitimate exceptions exist (small or technical use cases, infrastructure housekeeping). The guideline helps decide: is this really a business task worth supporting as an independent use case, or is it a small step that should live inside a larger use case?
Worked example — applying EBP to decide what counts.
- Candidate: Process Sale (also called Buy Item or Purchase Item). One cashier, at one POS terminal, in one sitting, triggered by "customer arrives with goods to purchase," adds measurable value (sale recorded, stock reduced, money taken, receipt generated), leaves data consistent (inventory, accounting, commissions reconciled). Passes EBP → keep as a use case.
- Candidate: Scan Item. One action within Process Sale, by itself adds no measurable value outside the larger sale and leaves no standalone consistent business outcome. Fails EBP → keep as a step inside Process Sale, not a use case.
- Candidate: Negotiate Contract. For a simple point-of-sale terminal with fixed prices, negotiating a contract is not part of the sale processing scope; it does not match the business event the POS is built to handle. It would belong to a separate negotiation system if needed at all. In the lecture this example was discussed as "push out of the current sale processing scope." Even if phrased as a verb-plus-noun, it fails the value-in-context test for this boundary. Out of scope → do not include in the POS use-case model for fixed-price sales.
- Candidate: Manage Security (Manage Users, Startup, Shutdown). These are legitimate but small or infrastructural. Some fail a strict EBP reading (they may be performed by a manager or by Time, and be housekeeping). They are kept as use cases where the organization treats them as operational goals, often ranked lower for early iterations.
Sense-check: If EBP says "no" but the stakeholder insists the need is real, ask whether it is a subfunction, a constraint, or a quality attribute rather than a user-goal use case. Clarify the goal level before forcing it into the diagram.
Q and A — is EBP a law?
Q: How do we know a use case is valid? Does every use case have to satisfy EBP?
A: EBP is a checking guideline, not a strict law. It says: one person, one place, one time, triggered by a business event, adds measurable value, consistent state at the end. Most use cases that give real business value match it. Some small or technical cases — such as Manage Users or infrastructure tasks — may not pass every clause, but then you should ask whether they are truly independent use cases or steps inside a larger one. Use EBP to argue validity, not to reject a clear business need on a technicality.
Application tip: On an exam, state each EBP element for the candidate and conclude "EBP satisfied / not satisfied because ...", then name the consequence (keep, merge into larger use case, move to another system).
Pitfalls.
- Splitting steps into use cases. "Login" feels like a use case to many novices, but in the POS context it is often a subfunction used by many flows rather than an independent user-goal with its own business value outside those flows. Call it a subfunction and include it, rather than promoting every step.
- Hunting for all use cases in one sitting. The anxiety to find everything at once leads to speculative, bloated models. Iterative discovery — a quick actor-goal list, then elaboration of the critical slice — produces higher quality requirements because later iterations benefit from feedback.
- Ignoring events and offstage interests. Missing Time-triggered events or government/tax interests leaves gaps that surface later as compliance failures.
Visual intuition: picture two walls in a workshop. On wall A, sticky notes in two columns: left column actors (Cashier, Manager, Payment Service, Tax Agency, Time), right column goals (Process Sale, Handle Returns, Manage Users, Submit Taxes). Lines connect each goal to its primary actor — that is the actor-goal wall. On wall B, a timeline of events (customer arrives, item entered, payment requested, authorization response, sale logged) flows left to right. Connecting the walls shows coverage: every event on wall B touches a goal on wall A, and every goal has events that trigger and complete it. A gap — an event with no goal, or a goal with no event — is a requirements defect.
Real-world and domain connection: In a store, "Process Sale" readily passes EBP while "scan item" alone does not, because only the larger sale adds measurable value outside the transaction. The same judgment recurs in banking ("Transfer Funds" versus "enter account number") and in university enrollment ("Enroll Student" versus "enter student name"). The method — actor-goal list plus event/state view plus EBP check — travels directly across domains.
Recap + Bridge. Find candidates through actors and goals or through events and state changes; name them with a strong verb-plus-noun that communicates the goal; test them with the EBP guideline — one person, one place, one time, business event, measurable value, consistent state. With a validated set of goals in hand, the next planning question is which goals to build first and how to show the scope in a picture without pretending the picture is the contract.
Exam note: Be ready to apply EBP to a candidate (e.g., Process Sale, scan item, negotiate contract) and argue validity: name each EBP element, state whether it is satisfied, and conclude keep / merge / out-of-scope. The out-of-scope argument for "negotiate contract" in a fixed-price POS must reference the boundary and the absence of a corresponding business event.
6.7 Ranking Use Cases and Drawing Diagrams
6.7.1 Ranking for Planning
Hook — You cannot build everything first. What goes first? A shop opens Monday. Which capability must work on day one, and which can wait until month two without closing the shop?
Not every use case goes first. Ranking orders implementation across iterations and increments so that the earliest builds deliver the most value and mitigate the most risk. Common label sets are Must-have / Essential / Nice-to-have or High / Medium / Low. In the UP and in agile variants, ranking reflects frequency, business impact, risk, and need — not merely whether a candidate passes the EBP check, and not merely technical neatness.
The NextGen POS example studied in Larman and referenced in the lecture illustrates the judgment. Teams pick the architecturally significant, high-business-value, high-risk goals first (often about 10% in the first requirements workshop) and implement them in the earliest timeboxed iterations.
Worked example — POS ranking and why.
| Use case | Rank | Reasoning (frequency × business value × risk) |
|---|---|---|
| Process Sale / Buy Item | High / Must-have / Essential | Happens all day, directly generates revenue, exercises the core architecture (catalog, pricing, tax, payment). Without it the shop cannot operate. |
| Handle Returns / Refund Item | Medium / Essential but not first-increment critical | Needed for customer satisfaction and accounting, but occurs far less often than sales. A first release can ship without it and the shop can still operate, though life without it is harder. Lower frequency pushes it to a later increment. |
| Process Rental | Medium | Similar to returns — legitimate but less frequent than sale in this retail context. |
| Manage Users / Manage Security | Medium to Low for early builds | Necessary for operations and compliance, but not on the critical path for the core sale. Often scheduled after the sale and return slices stabilize. |
| Shutdown / Startup / Time-triggered Close | Low | Infrequent, low immediate business risk, often handled manually or scheduled. Scheduled for later or as infrastructure. |
Ranking is a planning choice, not a pure property of EBP. A use case can pass EBP yet be ranked Low if its frequency and business impact are low. Conversely, everything ranked High must pass EBP or be a justified infrastructural exception.
Sense-check: Ask "If this use case were missing from the first release, could the business still function?" If yes, it is not High for that release, even if it is ultimately required.
This ranking guides agile planning directly. Build High-ranked use cases early in elaboration iterations. Add Medium and Low in later increments. In the UP's risk-driven and client-driven planning, early iterations both deliver visible features the client cares about and prove the core architecture under load.
Assumptions & Scope — limits of ranking. Ranking assumes timeboxed iterations with frequent stakeholder feedback (demos at iteration end) and a willingness to de-scope rather than slip dates — the UP's treatment of iterations as fixed in length. It breaks if prioritization is treated as a one-time waterfall vote; business value and risk evolve, so ranking is revisited each iteration-planning workshop.
Q and A — why Refund is Medium.
Q: Why is Refund Item ranked Medium while Buy Item is High and Shutdown is Low?
A: Frequency and direct business value decide, interpreted through stakeholder impact. Buying happens all day and directly touches revenue — High. Refund happens far less often; even if it is missing in version one the shop can still operate, though with manual workarounds, so Medium is reasonable. Shutdown is infrequent and carries less immediate business risk — Low. All three may pass EBP individually, so EBP alone does not decide priority. Ranking is the bridge between analysis and project management: it answers "what order builds trust and value fastest?"
6.7.2 The Use Case View and Diagram Notation
The use case view. A use case view gathers one or more UML use case diagrams that together show actors, use cases, and their links. One well-placed diagram gives a quick picture of scope: the system boundary in the middle (a rectangle labeled with the system name, e.g., NextGen POS), use cases inside as ovals, primary actors on the left, secondary actors on the right, and lines showing who interacts with what. Together with the text stories, the view answers "who does what with the system."
A standard POS example — consistent across Larman and the lecture — includes: Process Sale, Handle Returns, Process Rental, Manage Security, Manage Users. The Cashier as primary actor on the left drives Process Sale; secondary or supporting actors on the right provide services — Payment Authorization Service, Tax Calculator, Accounting System, Inventory System. Customers may appear as primary actors for goals they initiate directly (e.g., Process Rental where the customer is the driver), while system actors appear stereotyped as <<system>>.
Diagram work is about 20% of the use case effort; writing the stories is 80%. The picture is a summary and a check; the text is the real work. A useful discipline is to treat the diagram as a table of contents: if the diagram lists Process Sale, the use-case model must contain the corresponding written use case with its main flow and extensions. Keeping the two in sync prevents orphan ovals and orphan stories.
Conventions that improve readability (from UML use case guideline literature) include: place primary actors near the top-left where Western reading starts; put the most critical use cases near that actor; stack use cases to imply timing loosely (earlier goals above later ones); name actors with singular, domain-relevant nouns; associate each actor with at least one use case and each use case with at least one actor; draw actors on the outside edges of the diagram to signal they are out of scope. Generalization between actors is drawn with a closed arrowhead toward the more general element — e.g., International Student is like Student — and is applied to actors (and, rarer, to use cases) only when a clear "is like" sentence holds. Simplicity matters more than decoration; avoid curved or diagonal lines that complicate reading.
6.7.3 Happy Path and Completeness
Happy path first, then completeness. Write the success story first and get the happy path correct. Its traffic is very high — the 80 to 90% case — so most of the system's operational time follows it. Implementation, testing, and demos prove that path early, which is why High-ranked use cases build it first.
Once the main flow is solid, add alternates. Aim for clear intent, a named main success scenario, and named extensions branched by step (3a, 4b, *a). The combination of happy path plus extensions should satisfy nearly all stakeholder interests for that goal, with only quality attributes and standard constraints spilling into the Supplementary Specification.
Requirements are just in time and will change. Do not spend effort trying to capture everything forever in one pass. The UP's iterative caution is direct: after programming a few critical use cases, the team returns to workshops to refine the next slice with the benefit of real feedback. Capturing too much — specifying edge cases that may never arise — is a sign of overthinking. Capture what the stated problem needs, prove it with executable slices, and extend later when a real change appears.
Pitfalls.
- Ranking by EBP instead of by frequency and value. EBP tells you whether a candidate is a valid use case; ranking tells you when to build it. Confusing the two produces a schedule that builds rare but "clean" use cases before the revenue path.
- Treating the diagram as the specification. Over-detailed actor hierarchies and nested use-case relationships can consume days while the stories remain unwritten. As Cockburn and Larman warn, the hard work is writing text; organizing ovals is optional and can evolve incrementally over elaboration.
- Trying to perfect the complete picture in elaboration. The UP organizes work so that early iterations refine the core architecture and the most critical goals; the majority of use cases are defined and refined over several early iterations, not in a single big workshop.
Visual intuition: picture the POS diagram as a one-glance map on the wall by the coffee machine. Center: rectangle labeled "NextGen POS" containing five ovals stacked vertically: Process Sale at the top, then Handle Returns, Process Rental, Manage Security, Manage Users. Left margin: stick figure Cashier with lines to Process Sale and Handle Returns; higher up, Customer with a line to Process Rental. Right margin: three system stick figures (Payment Authorization Service, Tax Calculator, Accounting) each with dashed lines to the ovals they support. A new team member reading this in ten seconds understands scope, primary drivers, and supporting services — then turns to the text for the behavioral contract. The one-line takeaway: the diagram answers "who and what," the text answers "how, in what order, to what guarantee."
Real-world and domain connection: A single high-level diagram for a supermarket with Cashier, Payment Service, Tax Calculator, and Accounting System lets a newcomer see the whole scope instantly. In later elaboration the same view is refined — specializations like Cashier versus Supervisor (User as parent) may appear, and included subfunctions may be shown — but the map's purpose remains orientation, not specification. Tools such as AgroUML and StarUML automate drawing without changing the principle: keep the map simple, keep the stories detailed.
Recap + Bridge. Rank by frequency, business impact, and risk — Process Sale High, Refund Medium, Shutdown Low — and let that order drive timeboxed iterations; draw a light use case view (actors left/right, ovals inside, lines of involvement) as a scoping snapshot while the stories carry the contract. With the build order and the map in place, the remaining design choice is how use cases relate to one another without drowning the map in relationships.
Exam note: Be able to draw a use case diagram from a short description: place primary actors on the left and supporting/system actors on the right, label each oval with a strong verb-plus-noun name, and connect actors to the use cases they participate in. Keep the diagram simple — it is 20% of the work.
6.8 Links Between Use Cases
6.8.1 Include — The Common Part
Hook — Why write "Login" five times? If every protected flow starts with "Cashier identifies self, System authenticates," copying those steps into five places guarantees five places to forget an update.
Include (historically also called Uses) captures common behaviour — Login, tax calculation and other common behaviour that appears in several use cases — so you do not repeat it. Include common behaviour Login tax calculation is the textbook motivation: when one chunk is needed by many flows, factor it out as its own use case — typically a subfunction-level use case — and include it where needed. This is text refactoring and linking to avoid duplication, with navigable hyperlinks if the tooling supports it.
Classic reusable examples are Login, security authorization, and tax or GST calculation. Instead of writing the same login steps inside every use case that needs them, write Login once and let multiple callers include it. Likewise, Handle Credit Payment, once factored out from Process Sale's Extensions, can be included by Process Rental, Contribute to Lay-away Plan, and other payment points.
Include semantics. Include is use, not inheritance. One use case uses another. All included steps run every time the base use case runs, at a specific point in the base flow. Notation in text is either an explicit label — "7b. Paying by credit: Include Handle Credit Payment" — or an underlined (or highlighted) use case name that indicates an included subfunction. In diagrams, the base use case points with a dashed dependency arrow stereotyped <<include>> toward the included use case, conventionally drawn with the included oval to the right of the base.
Worked example — factoring GST calculation.
Before (duplication): Process Sale lists "System calculates GST," Process Rental lists the same GST steps, and Handle Returns lists refund GST reversal — three copies of the same tax logic.
After (with include): Create subfunction use case UC12: Handle GST Calculation (Level: subfunction).
- Main Success Scenario: System applies GST rules to the transaction total, presents the tax amount, records it for accounting.
- Extensions: Tax-exempt customer; system failure to reach tax service; multiple tax agencies.
Then in each base use case:
- Process Sale — Main Success Scenario, step 5: System presents total with taxes calculated — Include Handle GST Calculation.
- Process Rental — step 6: Include Handle GST Calculation.
- Handle Returns — step handling refund amount: Include Handle GST Calculation.
Sense-check: A change to GST rules is now made once, in one place, and every including use case benefits. If you instead copied the text, you would need to find and update every copy.
The same pattern applies to Handle Credit Payment: originally an extension inside Process Sale (7b. Paying by credit), it is factored into its own subfunction use case with its own Main Success Scenario and Extensions (failures to communicate with Payment Authorization Service, denial, timeout), and then included wherever credit payment occurs.
A practical guideline, attributed to Fowler, is: Use include when you are repeating yourself in two or more separate use cases and you want to avoid repetition. Another motivation is decomposition of an overwhelmingly long use case into subunits to improve comprehension.
Include also handles asynchronous event handling that can occur across a range of steps. Using labels a, b, ... or range labels like 3–9 together with an included confirmation or edit use case lets the base flows reference "at any time, Customer selects to edit personal information: Include Edit Personal Information" without enumerating that path at every step.
6.8.2 Extend — The Variation
Extend semantics. Extend captures variation and exception — the base use case is normal, but under certain conditions an extra or alternate path runs. Extend is for failure paths, choice paths, and seldom-run cases. One of them may run, or none may run, but they are not all meant to run together. The base use case is complete and whole by itself and has no reference to the extending use case; it is not modified to add the extension.
Simple purchase by cash is the base. Pay by credit card, pay by debit card, pay by digital wallet, handle machine out of order, handle no change, handle timeout — each is an extension handled at the relevant extension point. In modeling terms, all the what-can-go-wrong concerns at each step are collected as extensions to keep the main event flow readable.
A clean mental rule for the lecture:
- Repeating common part is Include — always runs when the base reaches that point, factoring reuse.
- Varying path is Extend — sometimes runs, under a condition or when something fails, inserting alternate behavior.
Factoring exceptions out as extensions keeps the main event flow readable; otherwise a single use case becomes a dense thicket of conditionals.
The extend relationship was designed for situations where the base use case should not be modified — perhaps it is baselined as a stable artifact, or continually modifying it with myriad new extensions is a maintenance burden. You create an extending (addition) use case that names the condition (Trigger) and the extension points (labels in the base such as "Payment, step 7" or "VIP Customer, step 1") where it inserts behavior. The extending use case points to the base with a dashed <<extend>> dependency (opposite direction to include: the extending points to the extended). The extension point indirection is deliberate — step numbering in the base can change without breaking the link.
Worked example — Purchase Ticket (base) with extensions vs. factoring as include.
Base use case: Purchase Ticket — Main Success Scenario assumes cash purchase (success 80%+).
Extensions as separate addition use cases (extend):
- E1 — Machine out of order (condition: ticket machine not operational) → extends base at "At any point before payment" → presents alternate machine or notifies staff.
- E2 — Cancel purchase (condition: customer cancels before completion) → extends at any point → voids transaction.
- E3 — No cash change (condition: insufficient change) → extends at payment step → offers smaller bill or cancel.
- E4 — Timeout error (condition: response not received within limit) → extends at payment step → signals timeout, offers retry or cancel.
- Each is seldom needed but must be named. In an extend rendering, these would be separate subfunction use cases stereotyped
<<extend>>toward Purchase Ticket, with their own trigger and main flow.
Contrast with an include rendering: the same branches could simply be recorded as text inside the Extensions section of Purchase Ticket ("7a. Machine out of order: ..."). When the variation catalog is small, updating the base's Extensions section directly is usually preferred over creating additional use cases.
Sense-check: Ask "does the base need to know about this branch to be complete?" For include, yes — the base explicitly invokes the included behavior. For extend, no — the base remains complete without knowledge of the extension; the extension is an optional insertion.
That distinction explains why some authors advise: prefer updating the Extensions section or using include in most cases, and reserve extend for when you truly need to extend a baselined base without touching it, or for highly asynchronous interrupt-like events (e.g., word processor "do a spell check now" at any time).
Assumptions & Scope — when extend earns its keep and when it does not. Use extend when:
- The base use case is closed to modification (stability, baseline, ownership boundary) yet behavior must be added.
- The condition is interrupt-like and could apply at a wide, asynchronous range of points.
Avoid extend when simple inline extensions or include already keep the base readable. Needless extend adds indirection and makes the model harder to scan — a consistent warning from Cockburn and other experts: "always use include over extend or generalization unless you have a specific reason."
Visual intuition: picture Purchase Ticket as a horizontal swim lane from left to right. The lane's center line is the main flow. Include appears as a small subroutine box below the lane that the main line explicitly calls at step 7 — a downward arrow labeled <<include>> pulling control into that box and returning. Extend appears as a side lane above, with dashed arrows labeled <<extend>> diving into the main lane at named extension points — the side lane is an optional detour that may activate, or may never activate, leaving the main lane complete even if the side lane were erased. The takeaway: include is a called subroutine; extend is an optional plug-in.
6.8.3 Generalization and When to Keep It Simple
UML also allows generalization — a parent and child link where the child is a specialization of the parent. For actors, generalization is intuitive: User as parent, Cashier and Supervisor as children, where a supervisor can do everything a cashier can plus more. The "is like" rule is a sanity check: "a Supervisor is like a User" and "an International Student is like a Student" make sense; "a Cashier is like a Payment Processor" does not.
For use cases, a child can do everything the parent does plus extra steps, or can rewrite parts of the basic or alternate courses. An example in the literature is Enroll Family Member as a child of Enroll Student: like normal enrollment, but several requirements reduced and fees calculated differently. Inheritance between use cases is much less common than include or extend, introduces another level of complexity, and lacks agreed best-practice guidelines for extracting value. Consultant experience is consistent: complications result and unproductive time is spent debating specialization.
Simplicity rule — the lecture's practical advice. Keep links simple. Adding many includes, extends, and generalizations can confuse more than it helps. Many teams model only Include and Extend where they truly reduce duplication or clarify choice, and show actor hierarchies only when roles truly form a parent-child set. Modern guidance is to focus on clear use case stories first, then add a few links only where they lower repetition or clarify a genuine choice. As Cockburn advises: as a first rule of thumb, always use include between use cases; teams that follow it report less confusion than those that mix the three relationships. A second guideline is to avoid more than two levels of use-case associations — a chain that includes an inclusion that includes another inclusion is a sign that functional decomposition is invading requirements.
Real-world note: The lecture's advice mirrors Larman Chapter 30's guideline to avoid agonizing over relationships. The case study itself uses only <<include>> for the NextGen POS, following the preference to keep things simple.
Q and A — Include versus inheritance versus Extend.
Q: Is Include the same as inheritance? And how is Extend different?
A: No — Include is not inheritance; it is use. One use case is factored out and used by several others to avoid repetition. Every time the base reaches the inclusion point, the included steps run. Classic factored examples are GST calculation used by refund, purchase, and pricing flows, or Handle Credit Payment used by multiple sales flows. Extend is about alternates and variation. If a condition holds or a failure occurs (machine out of order, no change, timeout, payment by different method), the extension runs; otherwise it does not. One way to hold the distinction: include is when you always need that chunk; extend is when you sometimes need a different branch under a named condition. If a use case grows too large, breaking its variation points into extensions (or into included subfunctions) is a way to keep each piece small — but avoid turning that into deep hierarchies.
Second question — Could we model all payment forms as extensions? Could we also use inheritance?
Payment by cash as base with card, debit, and digital wallet as extensions is a workable shape because each is a payment variation triggered by choice or failure. Treating each as a separate small subfunction linked by extend keeps the main flow simple and avoids a single oversized description. Using inheritance for such cases is not the first choice; include and extend already give the needed tools without mixing in class inheritance ideas, which carry different semantics. Reserve generalization for true specialization where the child rewrites the courses.
Terminology note: A concrete use case is instantiated by an actor (e.g., Process Sale); an abstract use case is a subfunction never instantiated alone (e.g., Handle Credit Payment). The base use case is the one that includes, is extended, or is specialized; the addition use case is the one that is included, extends, or specializes. Addition use cases are usually abstract.
Real-world and domain connection: In a ticket purchase flow, "purchase ticket" is the base; "machine out of order," "cancel purchase," "no cash change," and "timeout error" are useful extensions that keep the success story clean while ensuring rare but critical failures are named. Factoring Login, Tax Calculation, or Find Product Help once and including them wherever needed prevents requirements duplication across shopping, enrollment, and payment domains alike. Tools (AgroUML, StarUML) render <<include>> and <<extend>> as dashed dependencies, with include drawn horizontally (included to the right of the base) and extend drawn vertically (extending below the base) per common convention.
Recap + Bridge. Factoring repeating behavior into an included subfunction and capturing conditional variation as an extension keeps the main flow readable without rewriting the same text; generalization is a rarer specialization to be used sparingly. With the vocabulary of relationships complete, the lecture's remaining guidance consolidates what an exam expects and where these patterns show up in industry.
Exam note: Be able to state the rule of thumb — repeating common part is Include (always runs, factored for reuse), varying/conditional path is Extend (sometimes runs, triggered by condition) — and to argue against using inheritance (generalization) as the first choice. Given a short scenario, identify which relationship applies and sketch the correct dashed arrow direction.
Exam Guidance Summary
This appendix gathers the exam guidance heard across the lecture in one place for quick review. Each point is also marked inline where it applies in the relevant concept section.
How the exam will ask you to write.
- A template will be supplied — fill all given fields in that template rather than writing free long paragraphs or inventing your own headings.
- Mandatory parts for a use case are at least name, actors, and the use case itself (the main success scenario); other headings (preconditions, special requirements, tech variations, open issues) may be optional depending on scope, but stakeholders/interests and success guarantees are expected for a complete answer.
- Write a clear Main Success Scenario — at least one full paragraph or numbered flow — because without it the use case has no value. Follow it by named Extensions (alternate and failure scenarios); success alone is not enough.
- Use the format as asked: brief (one paragraph), casual (a few paragraphs plus alternates), or fully dressed (two to three pages with headings). Step-by-step, pseudocode, or actor–system two-column tables are accepted where the question asks for them.
- Keep each fully dressed description to two to three pages; do not over-expand or duplicate the whole set of use cases into one oversized submission.
Language and naming.
- Name use cases with a verb plus a noun that shows action in domain language: Process Sale, Handle Returns, Manage Users. Weak verbs like "process" in stakeholder language should be reworded where a stronger domain verb exists.
- Write only what, not how — no database, file, JDBC, SQL, or cloud detail in the use case text. "Sale is recorded" is correct; "System inserts into MySQL table sales" is not expected.
- Use the actor's vocabulary and terms comfortable to the user, not technical implementation terms. Keep essential, black-box style.
- Testable wording matters: each statement should be checkable by a stakeholder — observable value and consistent end state, not "system processes data."
Argument and judgment.
- Apply the EBP check to argue validity: one person, one place, one time, in response to a business event, that adds measurable value and leaves data in a consistent state. Most valid user-goal use cases satisfy it; small or technical cases may not, but then argue whether they are steps inside a larger use case rather than independent.
- For scope arguments, be able to explain why "negotiate contract" can be out of scope for a fixed-price point-of-sale sale process — it does not match the business event the POS boundary is built to handle and belongs to a separate negotiation system if needed.
- Read Larman, including the fully dressed template and one or two worked examples around page 68; also consult Writing Effective Use Cases by Alistair Cockburn for the broader style and for the Cockburn template.
Planning and diagrams.
- Ranking with Must-have / Essential / Nice-to-have or High / Medium / Low will be useful for planning. Be able to rank given examples and justify by frequency and business need, not by EBP alone: Process Sale / Buy Item is High (all-day revenue), Refund Item is Medium (less frequent), Shutdown is Low (infrequent, low immediate risk). Connect ranking to iteration order: build High-ranked, architecturally significant flows first.
- For diagrams, be able to draw a clean use case view: primary actors on the left, supporting/system actors on the right, system boundary as a rectangle with the system name, use cases as ovals with verb-plus-noun labels, and lines showing actor–use case involvement. Diagram effort is 20%; text is 80%.
Key Industry Applications
Where the lecture's patterns appear in practice.
- Reusable Login as an include. In retail banking, e-commerce, and university systems alike, capturing Login (identify and authenticate) once as a subfunction and including it in every protected flow — Process Sale, Manage Users, Handle Returns — avoids rewriting the same authentication steps and ensures a single point of change for security policy updates.
- Tax / GST valuation as a shared service subfunction. Purchase, refund, and pricing analysis all need correct tax. Factoring Handle Tax Calculation or Calculate GST into one included use case lets the tax logic track law changes in one place while every including flow benefits.
- Payment authorization as a supporting actor. An external Payment Authorization Service (and a Tax Calculator service) shown on the right side of the use case view provides business services without being a primary user. The POS requests approval, handles approval/denial/timeout as extensions, and the cashier asks for alternate payment — the same pattern appears in online checkout with a payment gateway actor.
- Supermarket POS as a scoping example. A single high-level use case view with Process Sale, Handle Returns, Process Rental, Manage Security, and Manage Users covers the scope of a retail system; ranked (Process Sale High, Returns Medium), it guides which increment delivers a working shop first.
- UPC scanning as a concrete actor–system interaction. "Cashier swipes product, scanner reads the UPC code, system looks up price" is the textbook stimulus–response step that appears in warehousing and checkout domains wherever barcodes are used; its failure extensions (invalid UPC, manual entry, Find Product Help) show the what-can-go-wrong discipline.
- CRC workshops as low-cost discovery. Developers and client stakeholders (cashiers, store managers, sales managers) each hold index cards and walk through a sale or rental scenario; missing responsibilities and missing collaborator links surface before any UML diagram or code is written.
- Tooling for diagrams. Teams capture the use case view in lightweight UML tools such as AgroUML and StarUML, keeping the diagram as a 20%-effort orientation map while the text stories carry the contract.
OODAP Lecture 6 notes · Use Case Modeling and Analysis
Sections Breakdown
Use case as set of related success/failure scenarios sharing one actor goal; contrasts feature lists; evolutionary just-in-time requirements.
Defining system boundary/scope; black-box view of system responsibilities separating what from how; essential vs concrete style.
Actor as external role vs stakeholder as interested party; primary/supporting/offstage actors and notation; observable result of value and consistent-state transitions with bank transfer example.
Class-Responsibility-Collaborator cards (4x6 inches, Beck/Cunningham 1989) and the role-play workshop walking through use case scenarios to discover responsibilities.
Brief/casual/fully dressed/two-column/interaction/pseudocode formats; Cockburn template elements; essential vs concrete style; how much detail (2-3 pages, just-in-time); cashier UPC example and extensions.
Actor-goal list and event/state methods for discovery; verb-plus-noun naming and intent definition; EBP guideline (one person/place/time, business event, measurable value, consistent state) to test validity.
Ranking High/Medium/Low by frequency and business value for iterative planning; use case view and UML notation (boundary, ovals, left/right placement, associations); happy path first with 80-90% traffic.
Include for common behavior factored across use cases; Extend for conditional variation; Generalization for specialization; keep links simple and prefer include; direction and notation of dependencies.
Consolidated exam expectations: template filling, mandatory parts, main flow plus extensions, 2-3 page limit, verb-plus-noun naming, what-not-how, testable language, EBP argument, ranking, diagram notation.
Reusable includes (Login, GST), payment service as supporting actor, POS scope example, UPC interaction, CRC workshops, AgroUML/StarUML tooling.
Exam Revision Notes
Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.
6.1 Use Cases as Collections of Scenarios for a Goal
Must-know: A use case is a collection of related success and failure scenarios (instances) that achieve one actor goal with observable value; write as stories, not diagrams.
⚠️ Top pitfall: Treating one alternate branch (e.g., card declined) as a separate use case, or writing only the happy path without failure extensions.
Self-check: Given 'Handle Payment', list the main success scenario and two failure extensions that share the same goal and leave the system in a consistent end state.
Connects to: 6.2; 6.5
6.2 System Boundary and the Black-Box View
Must-know: Black-box use cases state what the system does (observable responsibilities) not how it does it; avoid implementation language.
⚠️ Top pitfall: Writing 'writes to MySQL with JDBC' instead of 'records the sale'; or treating the use case diagram as the contract instead of the text.
Self-check: Rewrite 'System generates SQL INSERT for the sale' in correct black-box, essential style and explain why.
Connects to: 6.1; 6.3; 6.5
6.3 Actors, Stakeholders, and Goals
Must-know: Actor = external role; stakeholders include offstage interests; use case must yield observable value and move system between consistent states.
⚠️ Top pitfall: Modeling job titles as separate actors; missing offstage stakeholders like Tax Agency; accepting 'something happened' as value without testable outcome.
Self-check: Classify Cashier, Payment Authorization Service, and Government Tax Agency as primary/supporting/offstage and explain the left/right placement rule.
Connects to: 6.2; 6.6
6.4 CRC Cards — An Informal Way to Learn Object Orientation
Must-know: CRC = Class Responsibility Collaborator; 4x6 card with three compartments; workshop where holders act out use case scenarios line by line.
⚠️ Top pitfall: Confusing class vs object; overflowing a card without splitting the class; trying to model entire system at once with CRC.
Self-check: Walk through 'enter item' for Process Sale using Register, ProductCatalog, Sale, SalesLineItem cards and name each responsibility and collaborator.
Connects to: 6.1; 6.3; 6.5
6.5 Writing Use Cases — Formats and Templates
Must-know: Fully dressed template sections (name, actors, stakeholders, preconditions, success guarantee, main flow, extensions, special requirements, tech variations); write main success scenario as condition-free happy path; defer branches to extensions.
⚠️ Top pitfall: Embedding UI/concrete style in requirements; over-documenting beyond 2-3 pages; writing 'how' (database) instead of 'what' (sale is recorded).
Self-check: Convert 'The system writes sale to MySQL table' into essential black-box wording and place a failure (invalid UPC) correctly as extension 3a with condition and handling.
Connects to: 6.1; 6.2; 6.6
6.6 Finding and Checking Use Cases
Must-know: Two discovery methods (actor-goal list, event list); naming with strong verb+noun; EBP = one person one place one time + business event + measurable value + consistent state.
⚠️ Top pitfall: Promoting a small step (scan item) to a use case; forcing 'Login' as user-goal rather than subfunction; trying to find all use cases at once.
Self-check: Apply EBP to 'Process Sale' vs 'scan item' vs 'negotiate contract' (fixed-price POS) and argue keep/merge/out-of-scope.
Connects to: 6.3; 6.7
6.7 Ranking Use Cases and Drawing Diagrams
Must-know: High = Process Sale (all-day frequency); Medium = Refund/Handle Returns; Low = Shutdown; diagram 20% effort vs text 80%; primary left, supporting right.
⚠️ Top pitfall: Ranking by EBP instead of frequency/value; over-investing in diagram relationships while leaving stories unwritten.
Self-check: Rank Buy Item, Refund Item, Shutdown and justify; sketch the POS diagram placing Cashier, Payment Authorization Service, and Tax Calculator correctly.
Connects to: 6.6; 6.8
6.8 Links Between Use Cases
Must-know: Include = repeating common part, always runs at that point, factored to avoid duplication; Extend = conditional variation, sometimes runs; prefer include; generalization is specialization, use sparingly.
⚠️ Top pitfall: Calling include inheritance; creating deep chains of includes/extends; using extend when inline extensions or include would keep base readable.
Self-check: For ticket purchase with 'machine out of order' and 'GST calculation used by multiple flows', say include vs extend and draw arrow direction correctly.
Connects to: 6.5; 6.7
Exam Guidance Summary
Must-know: Fill supplied template; include name/actors/main flow; keep 2-3 pages; verb+noun; what not how; EBP and ranking arguments; left/right diagram rule.
⚠️ Top pitfall: Writing how (database) instead of what; missing failure extensions; trying to cover all use cases in detail before first iteration.
Self-check: Given a candidate use case, argue validity with EBP and rank High/Medium/Low with frequency/value reasoning.
Connects to:
Key Industry Applications
Must-know: Login and GST as includes; payment/tax as secondary actors; UPC scan interaction; CRC workshop value; diagram 20% vs text 80%.
⚠️ Top pitfall: Duplicating common text instead of including; confusing secondary actor with primary.
Self-check: Name two reusable includes and one supporting actor from the POS and explain left/right placement.
Connects to:
Was this lecture useful?
BitsNotes AI Assistant
Subject Notes AssistantConfigure AI Chat
Choose how to access the chatbotSigned in as
Powered by BitsNotes — 20 messages per day. No API key needed. Want unlimited access? Use "Bring Your Own Key" mode.
Sign in to use AI Chat
Get 20 free AI messages per day to ask questions about your lecture notes. Sign in with Google or GitHub — it takes 5 seconds.
Sign In to BitsNotesSwitch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.