Data requirements and user interfaces
When developing a coded solution to a problem, it is important to have an understanding of the data types and data structures that will be used to solve the problem. For example, creating a program that converts temperatures in Fahrenheit into Celsius.
To help developers create new software, data requirements are planned using a data dictionary. A data dictionary is a plan of the data structures to be used. For example:
Variable name | Data type/Structure | Description | Validation |
temp | float | user will input Fahrenheit temperature value into temp variable | >= 32.00 AND <= 212.00 |
all_temps | array | array to hold all temperature values entered | N/A |
convertTemp | Procedure | A function that will convert Celsius to Fahrenheit | N/A |
Name | String | Variable to store the users name | Length check: <=30 characters |
Variable name | temp |
---|---|
Data type/Structure | float |
Description | user will input Fahrenheit temperature value into temp variable |
Validation | >= 32.00 AND <= 212.00 |
Variable name | all_temps |
---|---|
Data type/Structure | array |
Description | array to hold all temperature values entered |
Validation | N/A |
Variable name | convertTemp |
---|---|
Data type/Structure | Procedure |
Description | A function that will convert Celsius to Fahrenheit |
Validation | N/A |
Variable name | Name |
---|---|
Data type/Structure | String |
Description | Variable to store the users name |
Validation | Length check: <=30 characters |
The data dictionary will include all variables, constants, functions, procedures and data structures such as arrayA set of data values of the same type, stored in a sequence in a computer program. Also known as a list. , 2D arrays and tuples.
Developers will also select an appropriate user interface for the application. Common user interfaces include: command line, menu driven, graphical and natural language.
Command line interfaces
A command line interface allows the user to interact with the computer by typing in commands. The computer displays a prompt, the user keys in the command and presses enter or return.
In the early days of personal computers, all PCs used command line interfaces.
Features of a command line interface
- Commands must be typed correctly and in the right order or the command will not work
- Experienced users who know the commands can work very quickly without having to find their way around menus
- An advantage of command-driven programs is that they do not need the memory and processing power of the latest computer and will often run on lower spec machines
- Command-driven programs do not need to run in Windows
- A command line interface can run many programs, for example a batch file could launch half a dozen programs to do its task
An inexperienced user can sometimes find a command-driven program difficult to use because of the number of commands that have to be learned.
An example of a common command-driven interface is MS-DOS. The MS-DOS command to display all files on c:\ would be: dir c:\.
Menu-driven interfaces
Simple menu
The user is offered a simple menu from which to choose an option. One menu often leads to a further menu. Part of the screen may have an instruction followed by a numbered list of options to choose from.
Full screen menu
A full-screen menu takes up the entire screen.
Menu bar
A menu bar is the set of options at the top of the screen. When an option is chosen, a further drop-down menu may be offered.
Features of menu-driven interfaces include:
- Easy to use – users do not have to remember sets of commands
- User friendly – you can often guess your way around the options without any prior knowledge of the interface
- Potentially irritating – users can become frustrated if there are too many levels of menus to move around (with command line interfaces you can go to the option required immediately)