A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Problem Solving/Decision tables





Decision tables are compact and precise ways of modelling complicated logic, such as that which you might use in a computer program. They do this by mapping the different states of a program to an action that a program should perform. Decision tables take on the following format:

The limited-entry decision table is the simplest to describe. The condition alternatives are simple Boolean values, and the action entries are check-marks, representing which of the actions in a given column are to be performed.

A technical support company writes a decision table to diagnose printer problems based upon symptoms described to them over the phone from their clients. They type the following data into the advice program:


 * 1) Printer does print
 * 2) Red light is flashing
 * 3) Printer is recognised

The program then uses the decision table to find the correct actions to perform, namely that of Check / Replace ink.

Let's take a look at a computer game example, for a football simulation the following rules are set up.

What happens when:
 * 1) 90 minutes up
 * 2) the game is a draw

Answer: Keep Playing and give them some extra time

Create a decision table for the following program in an office email system


 * Send email when Recipient address present, subject present, before 5:30pm
 * If after 5:30pm then put in pending folder
 * If Recipient address missing or subject message, give warning message

This question is open to interpretation, but you should have something resembling this:

Describe the use of Decision Tables

Determine logical conditions and consequential actions.



