Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

The analysis model

Notes on the Analysis Model: how to convert requirements into a requirements-centred, implementation-free model (domain model, use‑case analysis, data and behaviour models) used before architecture and 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 the analysis model when they must turn requirements (from requirements engineering and the SRS) into a clear, implementation‑free description of what the system must do and what concepts exist in the problem domain. A correct analysis model reduces rework in design, helps communicate with stakeholders, and is the basis for software architecture and later design models.

Key ideas

  • Domain model (conceptual model) — a part of the analysis model that captures the important concepts (things, events, roles) of the problem domain and the relationships among them. Each concept is modelled as a conceptual class (a class without implementation details). Draw as boxes labelled with the concept name and attributes that reflect domain facts, not storage.

  • Use case — a description of a sequence of actions (a scenario) between an external actor and the system that yields a measurable value to the actor. Use cases capture functional requirements. Always state preconditions and postconditions. Use-case texts are inputs to analysis: they help derive operations, classes, and interactions.

  • Actor — an external role (person, organisation, external system or device) that interacts with the system. Define actors before use cases.

  • Functional requirement — a requirement that states what the system must do (behaviour). Non‑functional requirement — a constraint on the system’s operation (performance, security, reliability). The analysis model should document both; functional requirements map to use cases and operations, non‑functional requirements appear as constraints on the model.

  • Abstraction — the act of focusing on relevant details and hiding irrelevant ones. In analysis, abstraction means ignoring implementation details (data structure, algorithms). Always state the level of abstraction you use for a model.

  • Separation of concerns — divide the problem into well‑defined parts (domain concepts, behaviour, external interfaces). In the analysis model, separate the domain model (static) from behaviour models (dynamic).

  • Static models (class or domain diagrams) describe things and their relationships. Behavioral models (sequence diagrams, state machines/state charts, activity diagrams) describe behavior and flow of control over time. DFDs are functional models that show data movement, not timing.

  • Mapping rules (common, exam‑style) — how to go from requirements text to analysis artefacts. Universities often expect a short, exact list; a typical accepted list is:

    1. Identify candidate classes: pick nouns (people, things, attributes) in the requirements text. Discard vague/general nouns ("process", "information") unless clarified.
    2. Identify candidate operations: pick verbs (actions) and map them to responsibilities of classes.
    3. Identify associations: verbs that connect two nouns become associations between classes; determine multiplicity from wording ("each", "many", "one of").
    4. Identify attributes: nouns that describe properties of a single concept become attributes of that concept.
    5. Identify generalisation (is‑a): look for classification words ("type", "category", "kind of") to form inheritance.
    6. Respect constraints and non‑functional requirements as invariants, preconditions or postconditions.

    Assumptions: the requirements text is reasonably complete and consistent; ambiguous phrases must be clarified with stakeholders.

  • Data Flow Diagram (DFD) — a diagram that shows how data moves between processes, data stores and external entities. A levelled DFD commonly includes a Context diagram (un-numbered) that shows the system boundary; a Level 0 DFD that splits the system into major processes; and Level 1+ diagrams that decompose Level 0 processes. DFDs focus on data movement, not timing.

  • State chart (state machine) — a model of valid states of a significant concept and transitions triggered by events or conditions. Each state must be named; transitions may have guards and actions. Use state machines for objects whose behaviour depends on history (e.g., Order: New → Confirmed → Shipped → Delivered).

  • Exactness universities expect: provide preconditions, postconditions, invariants and multiplicities. When asked to draw a domain model, list the candidate classes, attributes, associations and multiplicities, and state any assumptions.

Diagram instructions (what to draw and label):

  • Domain/class diagram: Draw a rectangular box for each conceptual class. In the box write the class name (capitalised) on top, then attribute names (no types needed in analysis unless requested), then a short list of responsibilities (operations) if asked. Draw lines for associations between classes; label relationships with role names (optional) and multiplicity (0.., 1, 1.. etc). Use a hollow triangle arrow for generalisation (inheritance) pointing from subclass to superclass. Use a diamond for aggregation and a filled diamond for composition; label if needed.
  • Use‑case diagram: draw an oval for each use case with a short name, stick figures for actors, lines showing which actor participates in which use case, and include relationships («include», «extend») as dashed arrows; indicate system boundary as a rectangle and place use cases inside it.
  • Sequence diagram: draw lifelines (named participants/objects) with dashed vertical lines, activation bars for execution, synchronous messages as solid arrows with filled arrowheads, asynchronous messages with open arrowheads, optional return messages as dashed arrows; order messages top-to-bottom; show object creation/destruction if needed.
  • DFD: draw circles or rounded rectangles for processes, open‑ended rectangles (or parallel lines) for data stores, arrows for data flows labelled with the data. External entities are squares/rectangles. For the Context diagram draw one process representing the system with external entities and flows.

Formulas

Class ::= <Name> { Attributes } [Responsibilities] — notation reminder: a conceptual class has a name, optional attributes and responsibilities; used in domain modelling.

Association(Name) between ClassA multiplicityA and ClassB multiplicityB — list multiplicity using 1, 0..1, 0..*, 1..*; multiplicity symbols mean how many instances may be related. Applies when drawing associations in class/domain diagrams.

UseCase := (Actor, Goal, Preconditions, MainSuccessScenario, Alternatives, Postconditions) — a short template to remember: each use case names the actor, the actor’s goal, preconditions, the main success scenario (steps), alternative flows, and postconditions; use when eliciting use cases from requirements.

DFD_Level0 := { ExternalEntities, SystemProcess, DataFlows } — context diagram composition; use when starting a DFD.

StateMachine := { States, StartState, Transitions(event [guard] / action), EndStates } — structure to remember for state charts.

Note: these are syntactic templates (notation reminders) rather than mathematical formulas; symbols are English identifiers. Use SI units only when modelling physical quantities in the problem domain.

Worked examples

Example 1 — Domain model from a short requirement (library lending) Requirement (short): "A library lets members borrow books. Each member may borrow up to 5 books at a time. A book can be in multiple copies. Members can reserve a copy if all copies are lent out. The system records loans with date borrowed and due date."

Steps and derivation:

  1. Identify nouns → candidate classes: Member, Book, Copy (or BookCopy), Loan, Reservation, Library (system or actor).
  2. Identify attributes from phrases: Member: memberId, name; Book: ISBN, title, author; Copy: copyId, status; Loan: dateBorrowed, dueDate, dateReturned (nullable); Reservation: dateReserved, priority.
  3. Identify associations: Member–Loan (a member has 0..* loans; each loan belongs to exactly 1 member); Loan–Copy (each loan is for exactly 1 copy; each copy participates in 0..* loans over time); Book–Copy (a book has 1..* copies; each copy is of exactly 1 book); Member–Reservation (a member may place 0..* reservations; each reservation is placed by exactly 1 member); Book–Reservation (a book may have 0..* reservations, ordered by date; each reservation is for exactly 1 book).
  4. Apply constraints: Member can have at most 5 active loans (invariant: count(loans where dateReturned is null) ≤ 5). Reservation allowed only if all copies status = lent.

Diagram description to draw (final answer):

  • Draw boxes: Member, Book, Copy, Loan, Reservation.
  • Associations (multiplicity at each end): Member 1 — 0..* Loan; Loan 1 — 1 Copy; Book 1 — 1..* Copy; Member 1 — 0..* Reservation; Reservation 1 — 1 Book.
  • Mark attribute examples inside each box.
  • State any assumptions: copies are distinct physical items; reservations are for a Book (title) and are assigned to a specific Copy when one becomes available; library fines and policies ignored.

Final answer (what exam expects): list of classes, attributes, associations with multiplicities and the invariant about max 5 loans. Bold constraints and assumptions.

Example 2 — From a use case to a state machine (online order) Use case (short): "Place Order": Customer selects items, checks out, system creates order in state New, payment processed, on success order moves to Confirmed, then at dispatch it moves to Shipped, and when delivered to Delivered.

Steps:

  1. Write main success scenario as steps (actor/system) and alternative (payment failure).
  2. Identify significant concept with stateful behaviour: Order.
  3. Define states: New, Confirmed, Shipped, Delivered, Cancelled.
  4. Define events/transitions: createOrder (action) creates New; paymentSuccess triggers New→Confirmed; paymentFailure may trigger New→Cancelled; dispatch triggers Confirmed→Shipped; delivery triggers Shipped→Delivered.

State chart to draw: box titled Order state machine, initial arrow to New, arrows labelled by events (paymentSuccess, paymentFailure [with guard], dispatch, deliver). Note postconditions (e.g., on Confirmed: inventory reserved).

Trace example for alternative flow: If payment fails, transition to Cancelled; record reason on order.

Common mistakes

  • Forgetting multiplicities or leaving them vague: multiplicities are required in class diagrams for full marks.
  • Omitting invariants, preconditions or postconditions for behaviour models.
  • Drawing DFDs that show control flow instead of data flow, or drawing state charts for trivial stateless objects.
  • Not listing assumptions or unresolved ambiguities from the requirements text.

For your exam

Question types you will see: definitions (analysis model, domain model), short notes (compare analysis vs design model), derivations (derive classes from a requirements paragraph), diagram tasks (draw domain/class diagram, use‑case diagram, DFD context and level 1, state chart), and short proofs/explanations (why separation of concerns matters). Sometimes you will be asked to show transformations from use cases to sequence diagrams or class responsibilities.

What a full‑marks answer includes:

  • A clear, textbook definition of the term asked (bold the term if asked).
  • A short list of assumptions.
  • A step‑by‑step derivation when transforming text to models (show noun/verb extraction, attribute/association choices, multiplicities).
  • Diagrams drawn as specified in Key ideas (boxes, labels, multiplicities, role names). If asked, provide textual preconditions, postconditions and invariants.
  • State any ambiguities left and how you would clarify them with stakeholders.

Quick check

  1. What is the main difference between a domain model and a design model?
  2. Give three places in the analysis model where non‑functional requirements appear.
  3. In a class diagram, what does multiplicity 0..* mean?

Answers: 1) Domain model is implementation‑free (conceptual classes, problem domain); design model includes implementation decisions (data structures, algorithms, interfaces). 2) Non‑functional requirements appear as constraints/invariants on the domain model, as conditions on use cases (performance/security), and as environment assumptions in context diagrams/DFDs. 3) 0..* means zero or more (an unlimited number) of instances may participate in the relationship.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?