Functional Requirements
Specifying What Software Must Do
When you describe a booking app, school portal, or online shop, naming its features is only a starting point. Developers need to know what the software should do in particular situations. A functional requirement states a behavior that a system is required to provide. It can describe accepting information, calculating a result, displaying a message, or changing stored information. Your aim is to make the required behavior precise enough that someone can distinguish a correct result from an incorrect one.
Connect a situation to a result
A useful functional requirement identifies the system, the triggering event, any relevant condition, and the required response. Not every sentence needs to repeat all four elements if the surrounding description already supplies them, but the intended behavior should be clear.
A useful writing pattern is:
When an event occurs, if its condition holds, the system shall produce the stated result.
Example: When a customer submits a reservation for an available seat, the booking system shall create a reservation and display its reference number. This identifies an event, a condition, and two observable results. By comparison, “The system shall support reservations” leaves the actual behavior uncertain.
Separate behavior from other decisions
Functional requirements concern what the software does. A statement about how quickly it does something describes a quality constraint. A statement choosing a particular internal data structure describes an implementation decision. These can all matter, but they answer different questions.
Statement | What it specifies |
|---|---|
Display the remaining seat count after a successful reservation. | Required system behavior |
Display reservation results within one second. | A speed constraint on behavior |
Store reservations in a hash table. | An internal implementation choice |
A hash table might help a developer implement the feature, but choosing it does not explain what a customer should see. Conversely, a functional requirement can specify a calculation without choosing a programming language or storage structure.
Use concrete verbs such as create, reject, calculate, record, and display. Words such as manage or handle usually need further detail. Specify the observable response, rather than merely saying that the system handles the request.
Include conditions and changes to information
The system's state is the information representing its current situation, such as available seats or existing reservations. A functional requirement may specify both a response and a change to that information. A confirmation message alone does not establish that a reservation was recorded.
Suppose a booking system has A available seats and receives a request for q seats, where q must be a positive integer. For a successful reservation, its required update is:
Example: If 20 seats are available and a customer successfully reserves 5 seats, the system records the reservation and changes availability to 20−5=15 seats. A request exceeding availability needs a separate stated response, such as rejection with no change to the seat count.
Boundary words matter. “Fewer than the available seats” excludes a request for exactly all remaining seats; “no more than the available seats” includes it. Likewise, stating successful behavior does not automatically specify what happens to an invalid request.
What to remember
- State the behavior the system must provide in a particular situation.
- Identify relevant events, conditions, responses, and information changes.
- Make numerical limits and equality cases explicit.
- Include required rejection behavior as well as successful behavior.
Example: Reserving School Equipment
A school lends portable microphones. Its reservation system stores the number of microphones available. Only students with enrolled accounts may reserve equipment. A request must specify a positive integer number of microphones no greater than the available count. A successful reservation records the quantity, reduces availability by that quantity, and displays Reserved. Any other request is rejected, displays Not reserved, and leaves both reservation records and availability unchanged.
A functional requirement connects these conditions to the behavior the system must provide. Initially, 11 microphones are available. Process the requests below in order, assuming no other activity occurs.
a) Write a precise functional requirement for a successful reservation.
First identify the triggering event: a student submits a reservation request. The acceptance conditions concern both the account and the quantity, so neither should be omitted.
A suitable requirement is: When a student submits a request for a positive integer quantity of microphones, if the account is enrolled and the quantity is no greater than current availability, the system shall record a reservation for that quantity, subtract it from availability, and display Reserved.
This states the conditions, the stored changes, and the visible response. A confirmation message and a recorded reservation are separate required effects.
b) An enrolled student requests 3 microphones. Determine the response and the new available count.
The available count before the request is ________, and the requested quantity is ________. The account is enrolled, and 3 is a positive integer satisfying 3≤11, so all acceptance conditions hold.
The system records a reservation for 3 microphones and calculates the new availability:
The required response is Reserved, and the new available count is 8 microphones. The check 8+3=11 confirms that available and newly reserved microphones account for the original quantity.
c) Next, a student whose account is not enrolled requests 2 microphones. Determine the response and the available count after this request.
The enrollment condition is ________. Although 2 is a positive integer and does not exceed the 8 microphones now available, the account condition fails. Every acceptance condition must hold for a successful reservation.
The rejection rule requires a change in availability of ________, so:
The system displays Not reserved, creates no new reservation, and leaves availability at 8 microphones. Subtracting the requested quantity despite rejection would contradict the specified behavior.
A library system contains this functional requirement: "When a registered member selects Renew on a book they have borrowed, and the book has no pending hold, the system shall extend the stored due date by 14 days and display the new due date." Match each element of a functional requirement to the part of this statement that fills that role.
The book has no pending hold
A registered member of the library
The recorded due date is now 14 days later
The new due date shown on the screen
Selecting Renew on a borrowed book
Actor
Output
Trigger
Precondition
Postcondition
An event-registration form requires a positive integer number of tickets. Complete the numeric boundary in this functional requirement, using a digit: When a submitted quantity is less than or is not an integer, the system shall reject the request, display Invalid quantity, and leave the registration records unchanged.