Requirements elicitation techniques in Software Engineering - Time & Space Complexity
When gathering requirements, the time it takes to collect and understand user needs can vary greatly.
We want to see how the effort grows as the number of stakeholders or requirements increases.
Analyze the time complexity of this simple requirements gathering process.
def gather_requirements(stakeholders):
requirements = []
for person in stakeholders:
for question in person.questions:
answer = ask(question)
requirements.append(answer)
return requirements
This code collects answers to questions from each stakeholder to build a list of requirements.
Look at the loops that repeat work:
- Primary operation: Asking questions to stakeholders.
- How many times: For each stakeholder, it asks all their questions.
As the number of stakeholders or questions grows, the total questions asked grows too.
| Input Size (stakeholders x questions) | Approx. Operations (questions asked) |
|---|---|
| 10 stakeholders x 5 questions | 50 |
| 100 stakeholders x 5 questions | 500 |
| 1000 stakeholders x 5 questions | 5000 |
Pattern observation: The total work grows directly with the number of questions asked.
Time Complexity: O(n * m)
This means the time grows proportionally to the number of stakeholders times the number of questions per stakeholder.
[X] Wrong: "The time only depends on the number of stakeholders, not questions."
[OK] Correct: Each stakeholder can have many questions, so total time depends on both factors multiplied.
Understanding how effort scales with more users or questions helps you plan and communicate project timelines clearly.
"What if we only asked a fixed number of questions regardless of stakeholders? How would the time complexity change?"
Practice
requirements elicitation techniques in software engineering?Solution
Step 1: Understand the purpose of requirements elicitation
Requirements elicitation is about collecting needs and expectations from users and stakeholders before development.Step 2: Differentiate from other software phases
Writing code, testing, and deployment happen after requirements are gathered.Final Answer:
To gather and understand what users and stakeholders want -> Option CQuick Check:
Requirements elicitation = gathering needs [OK]
- Confusing elicitation with coding or testing
- Thinking deployment is part of elicitation
interview technique in requirements elicitation?Solution
Step 1: Define the interview technique
An interview is a direct, one-on-one conversation to get detailed user needs.Step 2: Compare with other techniques
Group discussions are workshops, questionnaires are surveys, and silent watching is observation.Final Answer:
A one-on-one conversation to gather detailed information -> Option DQuick Check:
Interview = one-on-one talk [OK]
- Mixing interviews with group workshops
- Confusing interviews with surveys or observations
Solution
Step 1: Understand surveys and observations
Surveys collect user opinions via questions; observations watch real user actions.Step 2: Identify combined benefit
Using both gives a fuller picture: what users say and what they actually do.Final Answer:
It provides both user opinions and actual user behavior insights -> Option BQuick Check:
Surveys + observations = opinions + behavior [OK]
- Assuming combination always saves time
- Believing it guarantees no missing requirements
Solution
Step 1: Recognize limitation of single technique
Using only interviews can miss some needs because users may forget or not mention everything.Step 2: Importance of multiple techniques
Combining interviews with surveys, observations, or workshops improves completeness.Final Answer:
They did not use multiple elicitation techniques together -> Option AQuick Check:
Single technique misses needs; combine methods [OK]
- Thinking interviews always fail
- Blaming users for not knowing needs
- Assuming interviews only cover technical needs
Solution
Step 1: Identify explicit vs hidden requirements
Explicit needs are clearly stated; hidden needs are revealed by watching real user behavior.Step 2: Match techniques to requirement types
Observations reveal hidden needs by watching actions; interviews clarify explicit needs by asking questions.Step 3: Evaluate other options
Surveys alone miss hidden needs; workshops help but may not reveal hidden behaviors fully.Final Answer:
Observations and interviews, to see real behavior and ask detailed questions -> Option AQuick Check:
Hidden + explicit needs = observations + interviews [OK]
- Relying only on surveys or workshops
- Ignoring hidden requirements from behavior
- Assuming group talks reveal all needs
Ready to prove it?
Pass the test and this pattern moves unknown
