±«Óătv

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 nameData type/StructureDescriptionValidation
tempfloatuser will input Fahrenheit temperature value into temp variable>= 32.00 AND <= 212.00
all_tempsarrayarray to hold all temperature values enteredN/A
convertTempProcedureA function that will convert Celsius to FahrenheitN/A
NameStringVariable to store the users nameLength check: <=30 characters
Variable nametemp
Data type/Structurefloat
Descriptionuser will input Fahrenheit temperature value into temp variable
Validation>= 32.00 AND <= 212.00
Variable nameall_temps
Data type/Structurearray
Descriptionarray to hold all temperature values entered
ValidationN/A
Variable nameconvertTemp
Data type/StructureProcedure
DescriptionA function that will convert Celsius to Fahrenheit
ValidationN/A
Variable nameName
Data type/StructureString
DescriptionVariable to store the users name
ValidationLength check: <=30 characters

The data dictionary will include all variables, constants, functions, procedures and data structures such as , 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.

Graphic detailing different user interfaces on a computer

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)