Decision table based specifications.
Decision table based specifications
ADVANTAGES OF DECISION TABLE
Easy to understand by non-computer literate users and managers. Good documentation of rules used in data processing. Simple representation of complex decision rules. Tabular representation allows systematic validation of specification detection of redundancy, incompleteness & inconsistency of rules. There exist algorithms to automatically convert decision tables to equivalent computer programs.
METHOD OF OBTAINING DECISION TABLE FROM WORD STATEMENT OF RULES
EXAMPLE
A bank uses the following rules to classify new accounts If depositor's age is 21 or above and if the deposit is Rs 100 or more, classify the account type as A If the depositor is under 21 and the deposit is Rs 100 or more, classify it as type B If the depositor is 21 or over and deposit is below Rs 100 classify it as C If the depositor is under 21 and deposit is below Rs 100 do-not open account
Identify Conditions: Age >= 21 Cl
Deposits >= Rs 100: C2
Identify Actions : Classify account as A, B or C
Do not open account
DECISION TABLE FROM WORD STATEMENT
DECISION TABLE NOTATION EXPLAINED
• 4 Quadrants-demarcated by two double lines
• CONDITION STUB LISTS ALL CONDITIONS TO BE CHECKED
• ACTION STUB LISTS ALL ACTIONS TO BE CARRIED OUT
• LIMITED ENTRY DECISION TABLE:ENTRIES ARE Y or N or -.Y- YES,N- NO,-IRRELEVANT(DON’T CARE)
• X against action states it is to be carried out.
• - against action states it is to be ignored.
• Entries on a vertical column specifies a rule
•order of listing actions important while order of listing conditions is not important
•actions listed first carried out first
sequential execution of actions
•rules may be listed in any order
INTERPRETING DECISION TABLE-ELSE RULE
Interpretation
R1: If applicant sponsored and he has minimum qualifications and his fee is paid –Send Admit letter
R2: If applicant sponsored and has minimum qualifications and his fee not paid send provisional admit letter
ELSE: In all other cases send regret letter.The else rule makes a decision table complete
DECISION TABLE FOR SHIPPING RULES
EXTENDED ENTRY DECISION TABLE
- Condition Entries not necessarily Y or N
- Action entries not necessarily X or - Extended Entry Decision Tables(EEDT) more concise
- EEDT can always be expanded to LEDT
MIXED ENTRY DECISION TABLE
Can mix up Yes, No answers with codes
Choice of LEDT, EEDT, MEDT depends on ease of communication with user. Softwares are available to translate DTs to programs.DT’s are easy to check.
LINKED DECISION TABLE
1. Observe that one can branch between tables
2. Whenever complex rules are given it is a good idea to break them up into manageable parts
LOGICAL CORRECTNESS OF DECISION TABLE
From this table we see that the rule YY has two contradictory actions. Thus we need to examine the table further and make sure it is not a serious mistake. Also the rule C1=C2=N is missing which needs further examination.
Comments
Post a Comment