Page 276 -
P. 276
Chapter 9 • proCess speCifiCations and struCtured deCisions 243
Figure 9.8
Rules
Conditions and Actions 1 2 3 4 Using a decision table for
illustrating a store’s policy of
Under $50 Y Y N N customer checkout with four sets
Pays by check with two forms of ID Y N Y N of rules and four possible actions.
Uses credit card N Y N Y
Complete the sale after verifying signature. X
Complete the sale. No signature needed. X
Call supervisor for approval. X
Communicate electronically with bank for credit card authorization. X
possible. The following steps provide the analyst with a systematic method for developing deci-
sion tables:
1. Determine the number of conditions that may affect the decision. Combine rows that over-
lap, such as conditions that are mutually exclusive. The number of conditions becomes the
number of rows in the top half of the decision table.
2. Determine the number of possible actions that can be taken. That number becomes the
number of rows in the lower half of the decision table.
3. Determine the number of condition alternatives for each condition. In the simplest form of a
decision table, there would be two alternatives (Y or N) for each condition. In an extended-
entry table, there may be many alternatives for each condition. Make sure that all possible
values for the condition are included. For example, if a problem statement calculating a
customer discount mentions one range of values for an order total from $100 to $1,000 and
another range of greater than $1,000, the analyst should realize that the range from 0 up to
$100 should also be added as a condition. This is especially true when there are other con-
ditions that may apply to the 0 up to $100 order total.
4. Calculate the maximum number of columns in the decision table by multiplying the num-
ber of alternatives for each condition. If there were four conditions and two alternatives (Y
or N) for each of the conditions, there would be 16 possibilities, as follows:
Condition 1: 3 2 alternatives
Condition 2: 3 2 alternatives
Condition 3: 3 2 alternatives
Condition 4: 3 2 alternatives
16 possibilities
5. Fill in the condition alternatives. Start with the first condition and divide the number of
columns by the number of alternatives for that condition. In the foregoing example, there
are 16 columns and two alternatives (Y or N), so 16 divided by 2 is 8. Then choose one of
the alternatives, say Y, and write it in the first eight columns. Finish by writing N in the
remaining eight columns, as follows:
Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N
Repeat this step for each condition, using a subset of the table:
Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N
Condition 2: Y Y Y Y N N N N
Condition 3: Y Y N N
Condition 4: Y N
And continue the pattern for each condition:
Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N
Condition 2: Y Y Y Y N N N N Y Y Y Y N N N N
Condition 3: Y Y N N Y Y N N Y Y N N Y Y N N
Condition 4: Y N Y N Y N Y N Y N Y N Y N Y N