Application analysis
Application analysis is the activity of discovering and specifying what a software system must do and why, using use cases, scenarios, requirements (functional and non-functional), stakeholders, boundaries and simple models to produce a clear, testable basis for design.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Engineers use application analysis when they move from problem to solution: to discover stakeholders' needs, write testable requirements, fix the system boundary and find the main use cases and constraints before design. Good analysis reduces rework, guides architecture and lets verification and testing start early.
Key ideas
Note: I define every term before using it. Keep these short, plain and exact.
Stakeholder: any person, organisation or system that has an interest in the system or is affected by it. Example: end user, operator, regulator. Use the word "stakeholder" after this definition.
Requirement: a stated need that the system must meet. Requirements are statements about capability, behaviour or constraint. Do not write designs as requirements.
Functional requirement: a requirement that specifies a behaviour or function: what the system must do. Example: "The system shall allow a user to reset a password." Use after definition.
Non-functional requirement (NFR): a requirement that specifies a property, constraint or quality attribute: how the system behaves or under what constraints (performance, security, reliability, usability). Example: "Login must respond within 2 s under normal load." Use after definition.
Use case: a description of a sequence of interactions between an actor and the system that yields an observable result of value to the actor. A use case groups scenarios that share a goal.
Actor: an external role (human or external system) that interacts with the system to achieve a goal. Actors are outside the system boundary.
Scenario: a single instance (sequence) of interaction—a concrete path through a use case (e.g. successful login, failed login due to wrong password).
System boundary: a drawn dividing line that separates the system (inside) from the environment (outside). Use it to show what will be delivered.
Context diagram: a simple external-view diagram showing the system as one box and external actors/systems around it with labeled data flows.
Precondition: a condition that must hold true before a use case starts.
Postcondition (or success guarantee): the condition that holds after successful completion of a use case.
Trigger: the event that starts a use case.
Alternative flow: variant steps that deviate from the main (happy) flow but still lead to a goal or to a handled exception.
Business rule: a policy, constraint or rule from the business that constrains behaviour (e.g. "students with overdue fines cannot borrow books"). Business rules belong in analysis, not design.
Traceability: the ability to follow each requirement forward to design, code and tests and back to stakeholders.
Feasibility: an evaluation that checks if requirements are technically and economically possible.
MoSCoW: a simple prioritization method whose categories are Must have, Should have, Could have, Won't have (this time). Use to prioritise requirements.
SMART requirement: a checklist: Specific, Measurable, Achievable, Relevant, Time-bound. Use as a quality check.
Exact statement often asked in exams (write it down):
- A well-formed requirement R must satisfy: R is necessary, R is singular (atomic), R is unambiguous, R is verifiable (testable), R is consistent with other requirements, and R is traceable to a stakeholder need. State these as quality criteria when doing analysis.
Assumptions used in application analysis (state them explicitly in exam answers):
- Scope assumption: only the actors, interfaces and behaviours explicitly listed are in scope for this release; anything else is out of scope.
- Environment/volatility assumption: the environment may change; therefore declare external interfaces and assumptions clearly.
What to draw and label (explain exactly):
Context diagram: draw a single large rectangle (label it with system name). Draw external rectangles or stick figures outside it for each actor/external system. Draw directed arrows for data flows and label each arrow with the data exchanged (e.g., "Payment request", "Inventory update"). Title the diagram "Context diagram for <SystemName>" and include a small legend if needed.
Use case diagram (if required): draw an oval for each use case inside a larger rectangle that is the system boundary. Draw stick figures for actors outside. Draw lines from actors to the use cases they initiate. Label use cases with short verb-noun names like "Place order". If there are includes or extends relationships, use dashed dependency arrows with the stereotypes. For <<include>>, draw the arrow from the including (base) use case to the included use case. For <<extend>>, draw the arrow from the extending use case to the extended (base) use case; explain in the caption.
Use case textual description: give the name, primary actor, stakeholders, trigger, preconditions, main success scenario (numbered steps), alternative flows (numbered and cross-referenced), postcondition and special non-functional requirements.
Formulas
(For application analysis we list templates and short syntax lines to remember.)
User story = "As a <role>, I want <capability> so that <business value>" — role: actor; capability: short action; business value: measurable outcome.
Acceptance criteria (Gherkin) = Given <context> When <event> Then <outcome> [And|But ...] — write 2–5 per user story to make it testable.
UseCaseTemplate fields = Name; Primary actor; Trigger; Preconditions; Main success scenario; Alternative flows; Postconditions; Business rules; Priority — fields to fill for each use case.
Requirement statement syntax = "The system shall <verb> <object> [under conditions]" — use "shall" for mandatory requirements (writable, testable statements).
MoSCoW categories = {Must, Should, Could, Won't} — use for prioritisation.
SMART checklist = {Specific, Measurable, Achievable, Relevant, Time-bound} — apply to NFRs and important functional requirements.
Traceability matrix row = RequirementID -> UseCaseIDs -> DesignModuleIDs -> TestCaseIDs — keep bidirectional links.
Worked examples
Example 1 — Write a use case model and two use case texts for a simple Library Management System (LMS).
Question (typical exam): Identify actors and write a use case diagram and textual descriptions for two important use cases for an LMS that supports book borrowing.
Model answer (step-by-step):
Identify stakeholders and actors (list and define):
- Member (actor): registered library user who borrows books.
- Librarian (actor): staff who manages inventory and fines.
- Payment Gateway (external system actor): external system for fine payment.
Draw context diagram: draw a rectangle labelled "Library System"; place three external boxes/stick figures labelled Member, Librarian, Payment Gateway around it. Draw arrows: Member -> Library System labelled "Borrow request", Librarian <-> Library System labelled "Inventory update", Library System -> Payment Gateway labelled "Fine payment request".
Use case diagram: inside system boundary draw ovals for: "Search catalog", "Borrow book", "Return book", "Pay fine". Connect Member to Search, Borrow, Return, Pay; connect Librarian to Search, Inventory update (if modelled as use case). Show <<include>> from "Borrow book" to "Check member status" if you model membership check as shared.
Textual Use Case: "Borrow book"
- Primary actor: Member
- Trigger: Member selects "Borrow" for an available book.
- Preconditions: Member account exists and is active; book status = Available.
- Main success scenario (numbered):
- Member requests to borrow book B.
- System checks member status and fines.
- System checks book availability.
- System creates a loan record with due date and updates book status to Loaned. (This is the main result.)
- System shows confirmation to Member.
- Alternative flows: (2a) If member has unpaid fines, system shows fine amount and offers Pay fine flow (see "Pay fine").
- Postconditions: Book status = Loaned; loan record exists; due date assigned.
- Business rules: Members with overdue fines > 500 INR are blocked from borrowing.
- Priority: Must have
Use Case: "Return book" (short): Primary actor: Member; Trigger: Member hands book to return point. Main flow: receive book, check for damage, compute overdue fines if any, update book status to Available, clear loan record. Alternate flow: if damage detected, create damage report and notify librarian.
(End of example 1.)
Example 2 — Prioritisation and traceability (short model answer)
Question: Given requirements R1..R5, prioritise them using MoSCoW and map them to use cases.
Given (example): R1: The system shall allow user login. R2: The system shall send promotional emails. R3: The system shall process payments with 99% uptime. R4: The system shall provide an admin dashboard for reports. R5: The system shall store passwords using a salted, adaptive one-way hash (e.g., Argon2id or bcrypt).
Answer (steps):
Apply MoSCoW:
- Must: R1 (login), R3 (payments reliability), R5 (password hashing, salted and adaptive)
- Should: R4 (admin reports)
- Could: R2 (promotional emails) — business nice-to-have
Map to use cases via traceability table (example row):
- R1 -> UseCase: "Login", TestCases: TC_Login_Positive, TC_Login_Invalid
- R5 -> Design: AuthenticationService.hashPassword(), TestCases: TC_PasswordHash
Note conflicts/constraints: R3 (99% uptime) requires architecture decision (see System design decisions topic).
(End of example 2.)
Common mistakes
- Mixing actors and use cases (writing a use case that is actually an actor responsibility). Actors must be external.
- Omitting preconditions, triggers, or postconditions in use case text — examiners expect them.
- Not verifying NFRs with measurable numbers (e.g., writing "fast" instead of "response < 2 s under 100 concurrent users").
- Drawing the system boundary incorrectly: actors must be outside the boundary; use cases inside.
- Ignoring traceability: not linking requirements to tests and design.
For your exam
Types of questions you will see: definitions, short notes, drawing diagrams (context, use case), writing use case text, identifying actors and scenarios, listing NFRs and suggesting measurable statements, prioritising requirements with MoSCoW, making a small traceability matrix, and writing acceptance criteria or user stories.
What a full-marks answer includes:
- Clear definitions of terms used.
- Explicit assumptions (closed/open world, scope, stakeholder list).
- Correctly drawn labelled diagrams with legend and title (context or use case diagram as requested).
- For use cases: full template fields (name, actor, trigger, pre/postconditions, main and alternative flows, business rules, priority).
- Measurable NFRs (numbers where appropriate) and a brief note on feasibility/impact.
- A short traceability mapping or prioritisation using MoSCoW for a given set of requirements.
- Short discussion of risks or constraints if asked.
Quick check
- Define a use case and list its minimum textual fields.
- Give one measurable example of a performance NFR for a login service.
- What does MoSCoW stand for?
Answers: 1) A use case is a sequence of interactions between an actor and the system that yields value; minimum fields: Name, Primary actor, Trigger, Preconditions, Main success scenario, Postconditions. 2) "Login must respond within 2 seconds for 95% of requests under 100 concurrent users." 3) Must, Should, Could, Won't
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?