|
|
Decision TablesA decision table is a table composed of rows and columns, separated into four separate quadrants.
Developing Decision TablesIn order to build decision tables, you need to determine the maximum size of the table, eliminate any impossible situations, inconsistencies, or redundancies, and simplify the table as much as possible. The following steps provide offer some guidelines to developing decision tables: 1. Determine the number of conditions that may affect the decision. Combine rows that overlap, for example, 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. This 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 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. 4. Calculate the maximum number of columns in the decision table by multiplying the number of alternatives for each condition. If there were four conditions and two alternatives (Y or N) for each of the conditions, there would be sixteen possibilities as follows:
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 sixteen columns and two alternatives (Y and N), so sixteen divided by two is eight. Then choose one of the alternatives and write Y in all of the eight columns. Finish by writing N in the remaining eight columns as follows: Condition 1 YYYYYYYYNNNNNNNN
and continue the pattern for each condition:
6.Complete the table by inserting an X where rules suggest certain actions.
The dash (-) signifies that condition 2 can be either Y or N and action will still be taken.
8.Check the table for any impossible situations, contradictions,
redundancies. An ExampleA store wishes to program a decision on non-cash receipts for goods into
their intelligent tills. 1. Transaction under £50 The possible actions that a cashier could take are agreed as: 1. Ring up sale Using the rules above construct a decision table showing all possible combinations of alternatives. The condition rules are yes or no, therefore the number of possible condition rules are 2 alternatives for condition 1 x 2 alternatives for condition 2 x 2 alternatives for condition 3 or 2 3 = 8
We can see that some of the condition rules are invalid, the customer cannot pay by cheque AND pay by credit card or not pay by either method. We have decided that these combinations are mutually exclusive. This decision table can be reduced to 4 condition rules.
Indicate the actions.
Check for completeness. What if the customer has not shopped their before? Missing some as obvious as this means reconstructing the table! The conditions are now: 1. Transaction under £50 The actions remain the same but the number of condition rules increases by a multiple of 2.
The dash in the Pays by credit row indicates that it does not matter about the condition rule since if a customer pays by cheque they will not pay by credit card and vice versa ( mutually exclusive ).
Look for redundancies, contradictions and impossible situations.
The red and cyan columns are repeats and one is therefore redundant.
Some condition rules can be combined by examing the action stub for identical
actions and the pay by credit row in the condition stub can be removed since it
can create an impossible situation.
Final version of the decision table.
|
Notice: These notes are intended to be a supplement, not a substitute, to attending class.
|
|
Send mail to
webmaster@it4castudents.cjb.net with
questions or comments about this web site.
|