Software Engineering · Unit 4 · 3 hrs
Requirements Engineering
Exam-focused notes for Requirements Engineering (Software Engineering, CSC375): what the TU syllabus asks and how it has actually been tested, with 8 solved past questions from this unit.
Requirements Engineering in short
Requirements engineering is the process of discovering, analysing, documenting and checking the services a system must provide and the constraints it must operate under, before that system is designed and built.
What this unit covers
- Concept of User and System Requirements
- Functional and Non-Functional Requirements
- Requirements Engineering Process
- Requirements Elicitation
- Requirements Specification
- Requirements Validation
- Requirements Change
Requirements Engineering Process
2081 · 5 marks
Briefly explain on the requirements of engineering process. [5]
2080 · 10 marks
Explain the main activities used in requirements engineering. What are the desirable characteristics of a good SRS documents? Explain with example.[10]
Show solved answerHide answer
Requirements Engineering: Main Activities and Characteristics of a Good SRS Document
Part 1: Main Activities in Requirements Engineering
Requirements Engineering (RE) is the process of understanding and defining what services are required from a system and identifying the constraints on its operation and development. It is a critical stage because errors here propagate into design and implementation.
The main activities in requirements engineering are:
1. Feasibility Study
Before beginning full requirements analysis, a feasibility study is conducted to determine whether the proposed system is worth developing.
- It checks technical feasibility (can it be built?), economic feasibility (is it cost-effective?), and operational feasibility (will users use it?).
- Example: Before building an online banking system, the team checks whether the existing network infrastructure can support it and whether the budget is sufficient.
2. Requirements Elicitation and Analysis
This activity involves gathering requirements from stakeholders (customers, end users, domain experts).
Techniques used include:
- Interviews with stakeholders
- Observation of existing workflows
- Questionnaires and surveys
- Prototyping to clarify vague requirements
- Workshops and brainstorming sessions
Example: A developer interviews hospital staff to understand how patient records are currently managed before designing a Hospital Management System.
Challenges in this activity:
- Stakeholders may not know exactly what they want.
- Different stakeholders may have conflicting requirements.
- Domain knowledge may be difficult to understand.
3. Requirements Specification
Once requirements are gathered and analyzed, they are documented formally in a Software Requirements Specification (SRS) document.
Requirements are classified as:
- Functional Requirements: What the system should do (e.g., "The system shall allow users to log in using a username and password.")
- Non-Functional Requirements: Constraints on the system (e.g., "The system shall respond to any query within 2 seconds.")
- Domain Requirements: Requirements derived from the application domain (e.g., "The system shall comply with banking regulations.")
Example: For a library management system, a functional requirement is "The system shall allow librarians to add new books," and a non-functional requirement is "The system shall be available 99.9% of the time."
4. Requirements Validation
This activity checks that the documented requirements actually define the system the customer wants. It verifies that requirements are:
- Complete
- Consistent
- Realistic
- Verifiable
Techniques used:
- Requirements reviews (formal inspection by a team)
- Prototyping (building a quick model to validate understanding)
- Test-case generation (writing test cases to check if requirements are testable)
Example: A review team checks the SRS of a payroll system and discovers that the requirement "The system shall process salaries quickly" is not measurable, so it is revised to "The system shall process all salary transactions within 5 seconds."
5. Requirements Management
Requirements change over time due to evolving business needs, new regulations, or stakeholder feedback. Requirements management handles:
- Tracking changes to requirements
- Maintaining traceability (linking requirements to design and test cases)
- Controlling the impact of changes
Example: If a client requests a new feature in an e-commerce system after development has started, requirements management ensures the change is documented, evaluated for impact, and approved before implementation.
Summary Diagram of RE Activities
Feasibility Study
|
v
Requirements Elicitation and Analysis
|
v
Requirements Specification (SRS Document)
|
v
Requirements Validation
|
v
Requirements Management (ongoing)
Part 2: Desirable Characteristics of a Good SRS Document
A Software Requirements Specification (SRS) is a formal document that describes the intended behavior, functionality, and constraints of a software system. A good SRS must have the following characteristics:
1. Correctness
Every requirement stated in the SRS must accurately represent what the customer needs. There should be no false or misleading statements.
Example: If the customer needs the system to support 500 concurrent users, the SRS must state exactly that, not "a large number of users."
2. Completeness
The SRS must cover all functional and non-functional requirements, all possible inputs and outputs, and all constraints. Nothing important should be left out.
Example: An SRS for an ATM system must include requirements for cash withdrawal, balance inquiry, PIN change, and error handling for invalid PIN, not just the main transaction flow.
3. Consistency
No two requirements in the SRS should contradict each other.
Example: It would be inconsistent to state both "The system shall store user passwords in plain text" and "The system shall ensure all passwords are encrypted."
4. Unambiguity
Each requirement must have only one possible interpretation. Vague language like "fast," "user-friendly," or "efficient" should be avoided or precisely defined.
Example: Instead of writing "The system shall respond quickly," write "The system shall respond to all user requests within 3 seconds under normal load."
5. Verifiability (Testability)
Every requirement must be written in such a way that it can be tested or verified. If a requirement cannot be tested, it is not useful.
Example: "The system shall allow login" is verifiable. "The system shall be good" is not verifiable.
6. Modifiability
The SRS should be structured so that changes can be made easily without affecting the entire document. It should have a clear organization, table of contents, and cross-references.
Example: Using numbered sections and a requirements traceability matrix makes it easy to update one requirement without confusion.
7. Traceability
Each requirement should be traceable back to its source (customer need or business goal) and forward to design and test cases.
Example: Requirement R-12 "User shall be able to reset password via email" can be traced to the customer's security policy and linked to Test Case TC-12.
8. Ranked for Importance and Stability
Requirements should be prioritized (e.g., mandatory, desirable, optional) so that developers know what to implement first.
Example: In a hospital system, "Patient record storage" is mandatory, while "Graphical dashboard" may be marked as desirable and implemented only if time and budget permit.
Summary
Requirements engineering moves systematically from feasibility study through elicitation, specification, validation, and ongoing management, and the resulting SRS document only serves its purpose as the contract between developers and stakeholders when it is correct, complete, consistent, unambiguous, verifiable, modifiable, traceable, and properly ranked, since a defect in any one of these characteristics propagates directly into design, implementation, and testing errors later in the project.
Functional and Non-Functional Requirements
2080 · 5 marks
What is the difference between functional and non-functional requirement? Which is more critical and why? [5]
Show solved answerHide answer
Differences Between Functional and Non-Functional Requirements
Definitions
Functional Requirements define what a system or its component should do. They specify the functions, features, and behaviours that the software system must possess.
Non-Functional Requirements define the quality attributes of a software system. They specify how the software system should fulfill the functional requirements (e.g., performance, reliability, usability).
Differences Table
| Functional Requirements | Non-Functional Requirements |
|---|---|
| Defines a system or its component | Defines the quality attribute of a software system |
| Specifies "What should the software system do?" | Specifies "How should the software system fulfill the functional requirements?" |
| Specified by the user | Specified by technical people |
| It is mandatory | It is not mandatory |
| Helps to verify the functionality of software | Helps to verify the performance of software |
| Usually easy to define | Usually more difficult to define |
Which is More Critical and Why?
Functional requirements are more critical than non-functional requirements. The reasons are:
-
Mandatory Nature: Functional requirements are mandatory, meaning the system cannot be accepted or delivered without fulfilling them. Non-functional requirements, while important, are not strictly mandatory.
-
Core Purpose: Functional requirements define the very purpose of the system. If a system does not perform its intended functions (e.g., a banking system that cannot process transactions), it is completely useless regardless of how fast or secure it is.
-
Basis for Non-Functional Requirements: Non-functional requirements only make sense in the context of functional requirements. A system must first do something before we can measure how well it does it.
-
User Specification: Functional requirements are specified directly by the user, reflecting the actual needs the system must meet. Satisfying the user's core needs is the primary goal of software development.
Note: However, in safety-critical systems (e.g., nuclear power plants, aviation), non-functional requirements such as reliability and safety can become equally or even more critical, since failure can cost lives.
2079 · 10 marks
Differentiate between functional and non-functional requirement. Describe any three functional and non-functional requirement for library management system.[10]
2076 · 5 marks
Briefly explain functional, non-functional, and domain requirements. [5]
Requirements Specification
2076 · 5 marks
What is formal specification? Discuss interface specification in detail. [5]
Make Unit 4 stick
Practice CSC375 with flashcards & quizzes