Decision Tables *
Example scenario: “A marketing company wishes to
construct a decision table to decide how to treat clients according to three
characteristics: Gender, City Dweller, and age group: A (under 30), B (between
30 and 60), C (over 60). The company has four products
(W, X, Y and Z) to test market. Product W will appeal to female city dwellers.
Product X will appeal to young females. Product Y will appeal to Male middle
aged shoppers who do not live in cities. Product Z will appeal to all but older
females.”
Decision tables are
used to model complicated programming logic. They can make it easy to see that
all possible combinations of conditions have been considered; when conditions
are missed, it is easy to see this. The tables are composed of 4 parts:
conditions, actions, condition alternatives (each column is a rule), and
actions for the rules.
The process used to
create a decision table is the following:
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
|
Gender |
F |
M |
F |
M |
F |
M |
F |
M |
F |
M |
F |
M |
|
City |
Y |
Y |
N |
N |
Y |
Y |
N |
N |
Y |
Y |
N |
N |
|
Age |
A |
A |
A |
A |
B |
B |
B |
B |
C |
C |
C |
C |
|
MarketW |
X |
|
|
|
X |
|
|
|
X |
|
|
|
|
MarketX |
X |
|
X |
|
|
|
|
|
|
|
|
|
|
MarketY |
|
|
|
|
|
|
|
X |
|
|
|
|
|
MarketZ |
X |
X |
X |
X |
X |
X |
X |
X |
|
X |
|
X |
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
|
Gender |
F |
M |
F |
M |
F |
M |
F |
M |
F |
M |
|
City |
Y |
Y |
N |
N |
Y |
N |
N |
Y |
N |
N |
|
Age |
A |
|
A |
A |
B |
B |
B |
C |
C |
C |
|
MarketW |
X |
|
|
|
X |
|
|
X |
|
|
|
MarketX |
X |
|
X |
|
|
|
|
|
|
|
|
MarketY |
|
|
|
|
|
|
X |
|
|
|
|
MarketZ |
X |
X |
X |
X |
X |
X |
X |
|
|
X |
* Example and material taken from www.saintmarys.edu/~psmith/417lab3b.html