4 Requirements Engineering

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.

Requirements Engineering: notes

Concept of User and System Requirements

User requirements are statements, in natural language plus supporting diagrams, of the services a system is expected to provide and the constraints it must operate under; they are often called user needs, describe what the user does with the system, and are usually written up in a user requirements document as narrative text. Determining what a user genuinely wants a system to do is one of the hardest steps in building it, because users are often unable to communicate the whole of their needs, and the information they do give may be incomplete, inaccurate or self-contradictory. For that reason, user requirements are always treated as a separate, higher-level document from system requirements, which are far more detailed descriptions of the software's functions, services and operational constraints; the system requirements document should state exactly what is to be implemented, and often forms part of the contract between the customer and the developer. Different readers use each document: client managers, users and contractor managers read user requirements, while users, client engineers, developers and system architects read the more technical system requirements.

Functional and Non-Functional Requirements

Functional requirements state the services the system must provide, that is, what the system does or must not do, defined in terms of how it responds to particular inputs; if a functional requirement is not met, the system simply does not work. For a banking application, functional requirements would include validating a customer against the contact management system, allowing users to record customer sales, restricting revenue data to managerial staff, and integrating with a banking API. Well-specified functional requirements should be both complete (every service the user needs is defined) and consistent (no requirement contradicts another); catching a functional error at this stage is the cheapest point in the whole project to fix it.

Non-functional requirements are not concerned with any specific function the system delivers, but with system-wide properties such as reliability, response time, security and safety, that is, how well the system does what it does rather than what it does; unlike functional requirements, failing to meet a non-functional requirement does not stop the system performing its basic purpose, but it can still make the system unacceptable. Typical examples include forcing users to change an assigned login password on first use, blocking employees from updating their own salary record, ensuring a website can handle millions of concurrent users without degrading, and keeping the software portable across operating systems.

Functional RequirementsNon-functional Requirements
Define a system or one of its components.Define a quality attribute of the system.
Answer "what should the system do?"Answer "how should the system fulfil its functions?"
Specified mainly by the user.Specified mainly by technical staff.
Usually mandatory.Not always mandatory.
Verified by checking the software's functionality.Verified by checking the software's performance.
Usually straightforward to define.Usually harder to define.

Non-functional requirements are further classified by where they come from: product requirements specify the behaviour the product itself must have (efficiency, ease of use, safety, low cost); organisational requirements come from the policies and procedures of the customer's and developer's organisations (the process standard used, the implementation language, the design method); and external requirements come from factors outside the system and its development process altogether, such as legal or regulatory compliance and public acceptability.

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]

Requirements engineering (RE) is a process that involves all of the activities required to create and maintain a system requirements document. Its purpose is to make the problem being stated clear and complete, and to ensure that the solution is correct, reasonable, and effective. --- The process...

Open this answer on its own page →

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 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.

Open this answer on its own page →

2077 · 5 marks

Explain the process of requirement engineering. [5]

Requirement Engineering is a process that involves all of the activities required to create and maintain a system requirement document. The purpose of requirements engineering is to make the problem that is being stated clear and complete, and to ensure that the solution is correct, reasonable, a...

Open this answer on its own page →

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 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 RequirementsNon-Functional Requirements
Defines a system or its componentDefines 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 userSpecified by technical people
It is mandatoryIt is not mandatory
Helps to verify the functionality of softwareHelps to verify the performance of software
Usually easy to defineUsually more difficult to define

Which is More Critical and Why?

Functional requirements are more critical than non-functional requirements. The reasons are:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Open this answer on its own page →

2079 · 10 marks

Differentiate between functional and non-functional requirement. Describe any three functional and non-functional requirement for library management system.[10]

--- Basis Functional Requirements Non-Functional Requirements --------- Definition Describes what the system should do (functions, features, behaviours) Describes how the system should perform (quality attributes, constraints) Focus Functionality and features of the system Performance, security, ...

Open this answer on its own page →

2076 · 5 marks

Briefly explain functional, non-functional, and domain requirements. [5]

--- Functional requirements are statements of the services that the system must provide. They define the basic system behaviour -- what the system does or must not do -- and describe how the system responds to inputs. - These are the main things that the user expects from the software. - If funct...

Open this answer on its own page →

Requirements Specification

2077 · 5 marks

Discuss the structure of SRS document. [5]

An SRS (Software Requirements Specification) document is a formal document that precisely describes all the requirements of the software system to be developed. It serves as a contract between the client and the development team. --- A standard SRS document typically contains the following sectio...

Open this answer on its own page →

2076 · 5 marks

What is formal specification? Discuss interface specification in detail. [5]

Formal specification is a technique of describing the properties and behavior of a software system using mathematically precise notations and languages. It provides an unambiguous, rigorous, and complete description of what a system should do (its requirements) before implementation begins. Key c...

Open this answer on its own page →