The purpose of a piece of software is the starting point for the analysis phase. The purpose and functional requirements can be defined in terms of inputs, processes and outputs.
The following brief examples demonstrate the distinction between the purpose and functional requirements of software.
Example 1
Purpose
Software should be created to allow a user to enter ten numbers. Each number must be validated to make sure that it is no less than 0 and no more than 100. The program should keep a running total of the numbers entered and output the final total.
Functional requirements
Inputs
Processes
Outputs
Ten numbers
Validate ten numbers
Total
Calculate total
Inputs
Ten numbers
Processes
Validate ten numbers
Outputs
Total
Inputs
Processes
Calculate total
Outputs
Example 2
Purpose
The owners of a theme park have asked that a program be developed to record the average number of visitors in a week. A user will enter the total number of visitors for each day of the week. The program should then output the average number of visitors across the week.
Functional requirements
Inputs
Processes
Outputs
Daily total
Calculate average
Average
Inputs
Daily total
Processes
Calculate average
Outputs
Average
Example 3
Purpose
A program is to be developed to create usernames for a class of twenty pupils. The program will ask a teacher to enter the first name, surname and age of each pupil. The age entered must be between five and eighteen. The program should output a list of usernames for the teacher.