IITM · Software Engineering · Lecture + Transcript + Assignment Notes

Software Requirements: Gathering, Analysis & Specification

Complete consolidated notes built from the lecture slides, the full lecture transcripts, and all 14 graded assignment questions — organised in the exact order the topics are taught.

Dr. Sridhar Iyer · IIT Bombay Dr. Prajish Prasad · FLAME University 5 Lectures + 14 MCQs
Heads-up on the label The files you've shared are titled "Week 2" by the course (the transcripts even say "in the first week we looked at process models"). So this content is the Requirements week — the week right after process models. The notes below cover everything in it.
LECTURE 01

Requirements Gathering & Analysis

Before writing a single line of code, we must answer one question: what exactly does the customer need? This lecture introduces the two-step process of first gathering requirements from users, then analysing them to remove problems.

1.1 The running example: Amazon Seller Portal

Throughout the week, the professors use one case study — a seller portal (like Amazon's), where sellers list and sell products online. Every concept (users, techniques, requirements, SRS, user stories) is illustrated on this same system, which makes it a very likely source of exam examples.

1.2 The three types of users

Requirements come from users — but "users" is not one homogeneous group. The course divides them into three categories:

Definitions

Primary users — the frequent, hands-on users who directly interact with the system.

Secondary users — those who don't use the system directly, but use it through an intermediary.

Tertiary users — those who never use the system at all, but are affected by its introduction, or influence its purchase.

User type Seller-portal examples Why they belong here
Primary Independent sellers; sales teams of consumer companies (mobiles, computers); independent authors/publishers They log in and operate the portal every day
Secondary Sales managers who periodically want sales numbers, profits, margins They get the information via the sales team, not by using the portal themselves
Tertiary Logistics/shipping companies; banks (money transfer to sellers); buyers on Amazon They never open the portal, yet the portal's behaviour directly affects them
Exam tip The trick with tertiary users: banks and delivery companies keep reappearing — the portal must interface with banks for payments and with logistics for delivery, even though neither ever "uses" the portal.

1.3 Requirements Analysis — three classic problems

Since requirements are gathered from many stakeholders and many sources, the raw collection is messy. Analysis means forming a clear understanding of the exact customer requirements and weeding out problems. Three problems dominate (and they are exactly what assignment Q1–Q3 test):

Problem Meaning Seller-portal example from the lecture
Ambiguity The requirement has several possible interpretations — the user and the developer may understand it differently "Sellers need to manage their inventory." Manage = add products? modify price? delete? Each person interprets it their own way.
Inconsistency Two requirements contradict each other; different stakeholders want conflicting things Independent sellers want payment credited every week; the bank says payments can only be credited bi-weekly. Developers must resolve the conflict.
Incompleteness Some aspect is overlooked / left unspecified — neither customer nor developer imagined all details "Sellers want to track orders." Track delivered orders? Orders in transit? Returned orders? The missing detail must be filled in before development.
Lecture 1 summary (from the slides)
  • Requirement identification and analysis is a critical first phase.
  • Identify requirements by considering primary, secondary and tertiary users.
  • Analysis is essential to catch ambiguities, inconsistencies and incomplete requirements.
  • Only after this are we in a position to start designing the system.
LECTURE 02

Identifying Users & Requirement-Gathering Techniques

We know who the users are. Now: how do we actually collect requirements from them? Do we just tap users on the shoulder and ask? The lecture gives five systematic techniques.

2.1 Technique 1 — Questionnaires

A questionnaire is a series of questions designed to elicit specific information from users. Questions can be yes/no, multiple choice, or longer comments.

2.2 Technique 2 — Interviews

An interview is asking someone a set of questions — often face-to-face, but telephonic or online works too.

2.3 Technique 3 — Focus groups (and workshops)

Instead of one person, get a group of stakeholders together to discuss issues and requirements.

2.4 Technique 4 — Naturalistic observations

Go and watch users doing their actual work in their actual environment.

2.5 Technique 5 — Studying documentation

Many tasks are governed by manuals, written procedures, standards and regulations.

2.6 Summary table (memorise this)

Technique Good for
Questionnaires Answering specific questions (large, dispersed audience)
Interviews Exploring issues
Focus groups Collecting multiple viewpoints (consensus + conflict)
Naturalistic observations Understanding context
Documentation Procedures, regulations, standards

2.7 Basic requirement-gathering guidelines

  1. Focus on identifying stakeholders' needs.
  2. Involve all stakeholder groups — primary, secondary and tertiary — because each type has different needs.
  3. Use a combination of techniques — different techniques serve different purposes.
  4. Run a pilot session if possible — especially for questionnaires (a missing question or wrong options is hard to fix after users have already responded).
  5. Be pragmatic — data gathering is expensive and time-consuming; compromises are often necessary.
Outcome for the seller portal
  • Using these techniques, the team identified that a catalogue and inventory are essential, and that the portal must track orders, payments, sales and customer feedback.
LECTURE 03

Functional vs Non-Functional Requirements

Not all requirements have the same character. Compare: "A seller can add or delete items from their catalogue" versus "When a new product is added, it must show up within 5 seconds." They are fundamentally different kinds of requirements.

3.1 Functional requirements — what the system does

Definition A functional requirement captures a functionality the users require from the system: the user gives inputs/performs actions, and the system produces an appropriate output. It behaves like a mathematical function f : I → O, transforming elements of the input domain I into values in the output domain O. Each functionality should be clearly described along with its input and output data.

Example: "A seller can add/edit/delete their catalogue" — the add/edit/delete actions are inputs; the updated catalogue is the output.

3.2 Non-functional requirements — how the system behaves

Definition A non-functional requirement cannot be expressed as an input→output function. It specifies how the system should behave, not what it should do — e.g. speed, reliability, security constraints on the system's behaviour.

Example: "The product update should appear in the catalogue within 5 seconds" — no new functionality, just a constraint on behaviour.

3.3 The main categories of NFRs covered

NFR Definition (from lecture) Seller-portal example
Reliability The extent to which a program behaves the same way over time in the same operating environment (doesn't crash often) The portal must handle all operations correctly even as inventory changes with buying/selling
Robustness The extent to which a program can recover from errors and unexpected input (e.g. garbage input) The portal must handle very large numbers and high traffic
Others named Performance, Portability, Security, Interoperability — mentioned as further NFR categories (not covered in detail)
How to tell them apart in an exam (used in Q6) Ask: "Is this describing a capability (input→output), or a quality/constraint (time limit, uptime, security level)?" Words like "within X seconds", "must not crash", "must handle N users" almost always signal non-functional. Words like "user can search / add / delete / view" signal functional.
Lecture 3 summary
  • Functional requirements describe what the system should do.
  • Non-functional requirements specify how the system should behave — e.g. reliability, robustness, performance, portability, security.
  • Both must be considered when building a software system.
LECTURE 04

The SRS Document — organising requirements (Plan & Document)

We've gathered and categorised requirements. Now: how do we organise them? In the Plan-and-Document process model, the answer is the Software Requirements Specification (SRS).

4.1 Context and who writes it

4.2 Standard structure of an SRS

Section Contents Examples given in lecture
§1 & §2 — Introduction / Overall description Broad outline: purpose, scope, definitions, acronyms & abbreviations, product perspective, functions, constraints, assumptions, dependencies
§3.1 — External interface requirements User interfaces (screen images, GUI standards, layout) · Hardware interfaces (supported devices, data/control interactions between hardware and software) · Software interfaces (databases, OS, tools, libraries) · Communication interfaces ATM: interface between ATM hardware, card and software · Seller portal: interfaces with the Amazon buying-portal database · Email/SMS order notifications need an email-server interface
§3.2 — System features Broad high-level functions ("system features") + the functional requirements under each Seller portal features: 1 Manage catalogue · 2 Manage inventory · 3 Track orders · 4 Track payments · 5 Track inventory · 6 Track sales (specific day / last x days) · 7 Track customer feedback
§3.3 – §3.6 — Other NFRs Non-functional requirements: performance, security, etc.
Important nuance This structure is a guideline, not a rigid rule — organisations can modify the structure and content based on their context.

4.3 Advantages of maintaining an SRS

  1. Forms an agreement between customers and developers. The SRS goes to customers, is iterated on, and finally accepted — setting both sides' expectations.
  2. Reduces future rework. It forces stakeholders to rigorously think through all requirements before design and development, reducing later changes.
  3. Provides a basis for estimating costs and schedules. The SRS lets you estimate software size (a function of all requirements) → effort → cost → schedule.
  4. Facilitates future extensions. Serves as the basis for planning future enhancements.

4.4 The drawback — and the bridge to Agile

Drawback An SRS demands a lot of documentation. That's fine if requirements are fixed — but often customers themselves are unsure of their requirements, and their understanding evolves over time. The Agile perspective (next lecture: Behaviour-Driven Design) addresses this.
LECTURE 05

Behaviour-Driven Design & User Stories (Agile)

When requirements keep evolving, the Agile process — working closely with stakeholders, building a prototype, refining it in sprints of ~1–2 weeks — replaces the SRS with something lighter: user stories.

5.1 What is BDD?

Definition Behaviour-Driven Design (BDD) asks questions about the behaviour of an application — before and during development — so that stakeholders are less likely to miscommunicate. Requirements are still written down, but continuously refined. The BDD version of requirements = user stories, which take the place the SRS held in Plan-and-Document.

5.2 What is a user story?

Definition (this exact wording is assignment Q13) User stories are short, informal, plain-language descriptions of what a user wants to do within a software product that is beneficial and of value to them. They come from the HCI community, are traditionally written on 3×5-inch index cards, and are the smallest unit of work doable in one sprint (~1–2 weeks).

5.3 The Role–Feature–Benefit template

Every user story follows one pattern:

As a [type of user],  ← ROLE
I want [an action],  ← FEATURE / ACTION
So that [a benefit / value].  ← BENEFIT

The two worked examples from the lecture:

As an independent seller,
I want to view my inventory,
So that I can take stock of products which are low in number.
As an independent seller,
I want to view my customers' feedback for each product,
So that I can get a sense of the pertinent issues in my product.

5.4 SMART — the checklist for good user stories

Letter Meaning Bad → Good example from lecture
S Specific — precise enough that we know exactly what to implement "Users can search for a product" (vague — which attribute?) → "Users can search for a product by title in the catalog"
M Measurable — testable, with known expected results for good inputs "The seller portal should have good response time" (what is good?) → "When adding a product, it should appear in the catalog within 3 seconds"
A Achievable — implementable within one sprint/iteration A story too big for one sprint should be split into smaller stories
R Relevant — must provide business value to one or more stakeholders Features nobody benefits from shouldn't be built
T Timeboxed — development stops when the time budget is exceeded (then split or re-plan) Constraints like "…must be displayed within a reasonable time" also connect to time budgeting (see Q12)

5.5 Benefits of user stories

  1. Lightweight version of requirements — versus heavyweight SRS documentation.
  2. Help stakeholders plan and prioritise development — e.g. the client wants catalogue & inventory first, so the team commits to "view inventory in 2 weeks".
  3. Behaviour over implementation — because stories say nothing about how features are implemented, misunderstanding between stakeholders is reduced.
  4. Facilitate conversations between users and the dev team — e.g. seeing the feedback story, a client realises they'd also like email notification for products rated 1–2 stars. Such modifications are natural in Agile.

5.6 Drawbacks of user stories

Key takeaway
  • The choice of methodology depends on the type of application: fixed requirements / safety-critical → SRS (Plan & Document); evolving requirements → user stories (Agile/BDD).
GRADED ASSIGNMENT

All 14 Questions — with answers and the "why"

Every question below maps directly to a concept above. The correct option is highlighted, followed by the reasoning you should be able to reproduce in an exam.

Common passage · Questions 1–3 A healthcare smartwatch has to be developed for COVID-19 patients so that if the device identifies any risks associated with the patient's health condition, it alerts the shift doctors to take preventive measures. Doctors will provide the requirements for this system. For each question, identify the type of problem in the given requirement.
Q1 Requirement-analysis problem type

The stated requirement misses a condition: the actual requirement is that the device must alert the doctor only if body temperature > 104°F and oxygen saturation < 92%.

  • A. Ambiguous
  • B. Inconsistency
  • C. Incompleteness
Why The requirement as given overlooked details — the exact threshold conditions (104°F and <92% SpO₂) were never specified. Missing/unstated aspects = incomplete requirement, exactly like the "track orders" example (delivered? in transit? returned?) from the lecture.
Q2 Requirement-analysis problem type

A requirement from the doctors is phrased so that it can be interpreted in more than one way (e.g. what exactly counts as a "risk" that should trigger an alert is open to interpretation).

  • A. Ambiguous
  • B. Inconsistency
  • C. Incompleteness
  • D. None of above
Why When a single requirement admits several interpretations — so the doctor's mental model and the developer's mental model may differ — that is ambiguity (like "manage inventory" in the seller portal: add? edit? delete?).
Q3 Requirement-analysis problem type

Doctor-1 gives one alert condition, while Doctor-2 specifies that the device must alert only if body temperature > 103°F and oxygen saturation < 92% — the two doctors' requirements conflict.

  • A. Ambiguous
  • B. Inconsistency
  • C. Incompleteness
Why Two stakeholders give contradicting requirements (104°F vs 103°F threshold). Conflicting requirements from different sources = inconsistency — exactly like sellers wanting weekly payment while the bank allows only bi-weekly.
Q4 Gathering technique

Identify the requirement-collection technique used when it is required to achieve some consensus about the requirements and also highlight the areas of conflict.

  • A. Questionnaires
  • B. Interviews
  • C. Focus group
  • D. Documentations
Why "Gain consensus" + "highlight conflict/disagreement" is the lecture's word-for-word description of focus groups — multiple stakeholders discussing together reveal both shared needs and disagreements. Interviews can't (one perspective at a time); questionnaires only answer predefined questions.
Q5 Gathering technique

An organisation building an online medicine-selling app sends a team to visit medical shops to observe the process of selling medicines. Which technique is this?

  • A. Questionnaires
  • B. Focus group
  • C. Naturalistic observations
  • D. Documentations
Why Watching users perform their real task in their real environment (the shop) to understand context = naturalistic observation — the same as the lecture's "observe how people sell in physical shops" example.
Q6 Functional vs non-functional

A portal lets a user search for a product; it queries multiple websites and aggregates details on one page. Two requirements:
R1: The portal must gather information for the given product from all relevant websites and display it to the user.
R2: Given the product details, the portal must complete the gathering and display of information within 10 secs.

  • A. R1 is a functional requirement, whereas R2 is a non-functional requirement.
  • B. R2 is functional, R1 is non-functional.
  • C. Both are functional.
  • D. Both are non-functional.
Why R1 describes what the system does — input (product details) → output (aggregated info) — i.e. f: I → Ofunctional. R2 imposes a time constraint (10 s) on how it behaves → non-functional (performance), just like the "within 5 seconds" catalogue example.
Common passage · Questions 7–14 Consider this user story for a food delivery app:

Feature 1: Search dishes
As a customer,
I want to search for a dish
so that I can get the description of the dish along with its price and estimated delivery time within a reasonable time. The results must be displayed with appropriate pagination and filters.
Q7 Role–Feature–Benefit template

The statement "I want to search for a dish" reflects which component of the role-feature-benefit template?

  • A. an action
  • B. a benefit
  • C. a type of user
Why "I want [X]" is always the action/feature slot of the template. (Role = "As a customer"; Benefit = the "so that…" clause.)
Q8 Role–Feature–Benefit template

The statement "so that I can get the description of the dish along with its price and estimated delivery time within a reasonable time" reflects which component?

  • A. an action
  • B. a benefit
  • C. a type of user
Why The "so that…" clause always states the value/benefit the user gets from the feature.
Q9 SMART property

Making the story precise about what is retrieved — the description of the dish, its price and estimated delivery time — makes the user story more ____.

  • A. Specific
  • B. Measurable
  • C. Achievable
Why Spelling out exactly which details are shown removes vagueness about what to implementSpecific (compare: "search a product" → "search a product by title").
Q10 SMART property

Adding a testable expectation to the story — e.g. results displayed within a defined time with known expected results — makes the user story more ____.

  • A. Specific
  • B. Measurable
  • C. Achievable
Why Measurable = testable with known expected results for good inputs (like "product appears in the catalog within 3 seconds"). A quantified/verifiable condition makes the story checkable.
Q11 SMART property

Ensuring the story is small enough to be implemented within one sprint/iteration makes the user story more ____.

  • A. Specific
  • B. Measurable
  • C. Achievable
  • D. Relevant
Why Achievable means the story can realistically be completed in one sprint; oversized stories must be split.
Q12 SMART property

The constraint that results must be delivered "within a reasonable time" — i.e. the work is bounded by a time budget — relates to which SMART property?

  • A. Specific
  • B. Measurable
  • C. Achievable
  • D. Relevant
  • E. Timeboxed
Why Timeboxed = there is a time budget; if it's exceeded, you stop and re-plan/split the story. The time-bound phrasing in the story maps to the T of SMART.
Q13 Definition of user stories

Which statement correctly describes user stories?

  • A. Formal, detailed descriptions of software functionality implemented in the final product.
  • B. Short, informal descriptions of features that will provide value to the user, written using the role-feature-benefit pattern.
  • C. Detailed technical specifications describing exactly how the system should be implemented.
  • D. Documentation of the system's architecture and design.
Why This is the lecture definition almost verbatim: short, informal, plain-language, value-focused, role-feature-benefit. Options A/C/D describe formal specs and design docs — the opposite of the lightweight Agile artefact (and user stories deliberately avoid saying how to implement).
Q14 Limitation of questionnaires

What is a key limitation of relying on a questionnaire for requirements gathering (e.g. sent to sales-team managers)?

  • A. The questionnaire will be too detailed to analyze effectively.
  • B. It may only provide answers to specific, predefined questions and miss out on broader insights or emerging issues.
  • C. The questionnaire will make the developers' tasks too easy, leading to rushed work.
  • D. Sales team managers will not be able to fill out the questionnaire due to the complexity of the questions.
Why Questionnaires are good for specific questions — that's precisely their weakness too: you only learn answers to what you thought to ask. That's why the lecture insists they be used in conjunction with other techniques (interviews for exploring issues, focus groups for multiple viewpoints, etc.).
REVISION

One-page cheat-sheet

Concept One-line memory hook
Primary / Secondary / Tertiary users Uses it directly / uses it via someone / never uses it but affected (banks, logistics, buyers)
Questionnaire Specific questions, large dispersed audience — but only answers what you asked (Q14)
Interview Exploring issues; structured / semi / unstructured; one perspective at a time
Focus group Multiple viewpoints → consensus + conflict (Q4)
Naturalistic observation Watch real work in real context (visit the shop — Q5)
Documentation Procedures, regulations, standards (bank rules)
Ambiguous / Inconsistent / Incomplete Many interpretations / stakeholders contradict / details missing (Q1–Q3)
Functional requirement What the system does: f: I → O
Non-functional requirement How it behaves: reliability, robustness, performance, portability, security ("within 10 s" — Q6)
SRS System analyst's structured requirements doc; §1–2 overview, §3.1 interfaces, §3.2 system features + FRs, §3.3–3.6 NFRs
SRS advantages Agreement · less rework · cost/schedule estimation · future extensions
SRS drawback Heavy documentation — bad when requirements evolve → go Agile
BDD Ask about behaviour before + during dev → less miscommunication
User story Short, informal, 3×5 card, one-sprint unit: As a [role], I want [action], so that [benefit] (Q7, Q8, Q13)
SMART Specific · Measurable · Achievable · Relevant · Timeboxed (Q9–Q12)
User-story drawbacks Needs continuous customer contact; doesn't scale to huge / safety-critical projects