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:
Conditions | Condition alternatives |
Actions | Action entries |
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:
- Printer does print (N)
- Red light is flashing (Y)
- Printer is recognised (N)
The program then uses the decision table to find the correct actions to perform, namely that of Check / Replace ink.
Rules | |||||||||
---|---|---|---|---|---|---|---|---|---|
Conditions | Printer does not print | Y | Y | Y | Y | N | N | N | N |
A red light is flashing | Y | Y | N | N | Y | Y | N | N | |
Printer is unrecognised | Y | N | Y | N | Y | N | Y | N | |
Actions | Check the power cable | X | |||||||
Check the printer-computer cable | X | X | |||||||
Ensure printer software is installed | X | X | X | X | |||||
Check/replace ink | X | X | X | X | |||||
Check for paper jam | X | X |
No comments:
Post a Comment