Requirements are descriptions of what a system should do, the services it offers and the constraints on its operation. They are the basis of every later activity, so mistakes in them are expensive.

Kinds of Requirements

Requirements are written at two levels. User requirements are statements, in plain language and diagrams, of what services the system should provide and the constraints under which it must work. System requirements are more detailed descriptions of the software functions, services and operational constraints. User requirements are written for customers and managers, and system requirements are used by developers as the starting point for design.

Definition: Requirement. A statement of a service that a system must provide, or of a constraint on the system or its development.

Functional Requirements

Functional requirements state what the system should do. They describe the services, how the system reacts to particular inputs, and how it behaves in particular situations. For a college library system, examples are that a member can search the catalogue by title, that the system records a book issue with its due date, and that it calculates a fine for late returns. Functional requirements depend on the type of software and on the users, and they can be written at a general or a detailed level.

Non-Functional Requirements

Non-functional requirements are constraints on the services or functions. They apply to the system as a whole and not to a single feature. Product requirements cover performance, reliability, usability, security and portability. Organisational requirements come from the policies of the customer or developer, such as the programming language or standards to be used. External requirements come from outside, such as laws on privacy. Non-functional requirements are often more critical than functional ones, because a system that is too slow or insecure may be useless even if it has every feature.

Writing Verifiable Requirements

A requirement should be stated so that it can be tested. A vague goal such as "the system should be fast" cannot be checked. A verifiable form such as "a search shall return results within 2 seconds for a catalogue of 100000 books" can be measured. Metrics such as response time, failure rate and learning time make non-functional requirements testable.

Table 2.1: Functional and non-functional requirements

Aspect Functional Non-functional
States What the system does How well it does it
Scope A feature or service The whole system
Example Issue a book to a member Respond within 2 seconds
Testing Check the feature works Measure against a metric

Example 2.1: Classifying requirements

Problem: Classify each as functional or non-functional: (a) the system shall generate a monthly fee report, (b) the system shall be available 99 percent of the time, (c) the system shall allow a student to reset a password.

Solution:

  1. Generating a report is a service, so it is functional.
  2. Availability is a quality of the whole system, so it is non-functional.
  3. Password reset is a service, so it is functional.

Result: (a) functional, (b) non-functional, (c) functional.

Common mistakes

  • Writing a non-functional requirement in vague words that cannot be tested.
  • Mixing user requirements with design decisions.
  • Ignoring non-functional requirements until late in the project.

Key takeaways

  • Functional requirements say what the system does.
  • Non-functional requirements say how well, and they apply to the whole system.
  • User requirements are for customers, and system requirements are for developers.
  • A good requirement can be tested.

Practice questions

  1. What are functional requirements?
  2. Give an example of a non-functional requirement.
  3. Who are system requirements written for?

Answers to the practice questions

  1. Statements of the services the system should provide and how it behaves.
  2. The system shall respond to a query within 2 seconds.
  3. For developers, as the starting point for design.

Sources

  • Official BCA syllabus Software Engineering, course code 26BCA403DS03, Unit II