DECISION TABLES
A decision table is a tabular presentation of program logic. It displays all conditions affecting a particular situation. It gives appropriate action or actions to be taken for each set of conditions.
Decision tables are useful when a computer has to make large number of decisions or if there are a large number of different branches within a program.
Components of a decision table:
Table Heading |
Decision Rules Heading |
Condition
Stub |
Condition
Entries |
Action
Stub |
Action
Entries |
Table Heading: The name or number of the Decision Table specifying the problem which is being represented. For complex problems, the decision table is sometimes broken into parts where the Table heading would identify the part of the program being represented.
Condition Stub: The conditions that could exist in the program logic are described.
Action Stub: The action statements or possible outcomes of the system are described.
Decision Rules: These may be one or more decision rules numbered 1,2,3 ....n representing the answers to the Condition Stub and Action Stub described before.
Condition Entry: These represent the possibility of each of the condition stub (answer to each of the condition stub). The condition entry can be `Y’ for Yes or `N’ for No only.
Action Entry: The list relating to the set of action to be performed or taken to a given set of conditions. The action entry can be `X’ for selection action or ‘-‘ for unselected action only.