A decision table consists of two part stub and entry. FIGURE Structured English- Using Data Dictionary Values.
COMPUTE-DISCOUNT Add up the number of copies per book title IF order is from bookstore And – IF ORDER SIZE is SMALL THEN Discount is 25% ELSE (ORDER SIZE is MINIMUM) So no discount is allowed ELSE (order is from libraries or individual customers)
So-IF ORDER SIZE is LARGE Discount is 15% ELSE IF OREDR SIZE is EMDIUM Discount is 10% ELSE IF ORDER-SIZE is SMALL Discount is 5% ELSE (ORDER SIZE is MINIMUM) So no discount is allowed The stub part is divided into an upper quadrant called the condition stub and a lower quadrant called the action stub. The entry part is also divided into an upper quadrant, called the condition entry and a lower quadrant called the action entry. The four elements and their definitions are summarized in Figure . FIGURE Decision Table- Discount Policy Condition
Stub Condition Entry Action Stub Action Entry FIGURE Elements and Definitions in a Decision Table Elements Location Definition Conditions Stub Upper left quadrant Sets forth in question form the condition that may exist Action Stub Lower left quadrant Outlines in narrative form the action to Betaken to meet such conditon
Condition entry Upper right quadrant Provides answers to questions asked in The condition stub quadrant Action entry Lower right quadrant Indicates the appropriate action resulting Form the answers to the conditions in the Condition entry quadrant The answers are represented
by a Y to signify yes, an N to signify no, or a blank to show that the condition involved has not been tested. In the action entry quadrant an Xor a check mark will do) indicates the response to the answers) entered in the condition entry quadrant. Furthermore, each column represents a decision or a rule. For example, rule 1 states IF customer is a bookstore and order size is 6 copies or more. THEN allow 25%
discount So, according to the decision table, we have six decisions and therefore six rules. A look at the table provides each decision (answer) immediately the following rules should be followed in
constructing decision tables 1. A decision should be given a name, shown in the top left of the table.
2. The logic of the decision table is independent of the sequence in which the
condition rules are written, but the action takes place in the order in which the events occur.
3. Standardized language must be used consistently.
4. Duplication of terms or meanings should be eliminated, where possible.
Share with your friends: