SlideShare a Scribd company logo
2
Most read
4
Most read
22
Most read
By
D.MANIMALA
Decision tables are used to model
complicated programming logic. They can
make it easy to see that all possible
combinations of conditions have been
considered.
 Decision table provides a handy and
compact way to represent complex business
logic.
 In a decision table, business logic is well
divided into conditions, actions (decisions)
and rules for representing the various
components that form the business logic.
 The tables are composed of 4 parts:
conditions, actions, condition alternatives
(each column is a rule), and actions for the
rules.
Definition
 Decision tables are used to lay out in tabular form all
possible situations which a business decision may
encounter.
 A decision table lists causes and effects in a matrix.
Each column represents a unique combination.
 Purpose is to structure logic
Causes Values 1 2 3 4 5 6 7 8
Cause 1 Y, N Y Y Y Y N N N N
Cause 2 Y, N Y Y N N Y Y N N
Cause 3 Y, N Y N Y N Y N Y N
Effects
Effect 1 X X X
Effect 2 X X X
Combinations Cause = condition
Effect = action = expected
results
What is a decision table ?
Table representing complete set
of conditional expressions
 where expressions are mutually
exclusive in a predefined area
Why use decision tables ?
Powerful visualisation
 Compact and structured presentation
Preventing errors is easier
 Avoid incompleteness and inconsistency
Modular knowledge organisation
 Group related rules into single table
 Combine tables to achieve decision
Let’s take an example scenario for an ATM
where a decision table would be of use.
A customer requests a cash withdrawal.
One of the business rules for the ATM
is that the ATM machine pays out the
amount if the customer has sufficient
funds in their account or if the
customer has the credit granted.
A decision table makes the same
requirements clearer to understand
In a decision table, conditions are usually
expressed as true (T) or false (F)
 Above table contains three different business
rules, and one of them is the “withdrawal is
granted if the requested amount is covered by the
balance.”
 It is normal to create at least one test case per
column, which results in full coverage of all
business rules.
Requirement:
“Withdrawal is granted if
requested amount is covered by
the balance or if the customer is
granted credit to cover the
withdrawal amount”.
Express conditions and resulting actions in a list
so that they are either TRUE or FALSE.
In this case there are two conditions, “withdrawal
amount ≤ balance” and “credit granted”.
There is one result, the withdrawal is granted.
Step 2 : add Colum
 Calculate how many columns are needed in the table.
The number of columns depends on the number of
conditions and the number of alternatives for each
condition.
 If there are two conditions and each condition can be either
true or false, you need 4 columns. If there are three
conditions there will be 8 columns and so on.
 Mathematically, the number of columns is 2 conditions.
 In this case 22 = 4 columns.
Number of columns that is needed:
Now is the time to fill in the T (TRUE)
and F (FALSE) for the conditions
 How do you do that? The simplest is to say that it should
look like this:
 Row 1: TF
 Row 2: TTFF
 Row 3: TTTTFFFF
 For each row, there is twice as many T and F as the previous
line.
 Repeat the pattern above from left to right for the entire
row.
 In other words, for a table with 8 columns, the first row will
read TFTFTFTF, the second row will read TTFFTTFF and
the third row will read TTTTFFFF.
Step 3: Reduce the table
 Mark insignificant values with “-”.
 If the requested amount is less than or equal
to the account balance it does not matter if
credit is granted.
 In the next step, you can delete the columns
that have become identical.
Decision table
Decision table
Check for invalid combinations
 Invalid combinations are those that cannot
happen, for example, that someone is both an
infant and senior. Mark them somehow, e.g. with
“X”. In this example, there are no invalid
combinations.
 Finish by removing duplicate columns.
 In this case, the first and third column are equal,
therefore one of them is removed.
.
Step 4: determine action
 Enter actions for each column in the table.
 You will be able to find this information in
the requirement.
 Name the columns (the rules).
 They may be named R1/Rule 1, R2/Rule 2
and so on, but you can also give them more
descriptive names
Decision table
Step 5: Write test cases
 Write test cases based on the table. At least one test
case per column gives full coverage of all business
rules.
 Test case for R1: balance = 200, requested withdrawal =
200. Expected result: withdrawal granted.
 Test case for R2: balance = 100, requested withdrawal =
200, credit granted. Expected result: withdrawal
granted.
 Test case for R3: balance = 100, requested withdrawal =
200, no credit. Expected Result: withdrawal denied.
•Advantage of using decision
tables
is that they make it possible to detect
combinations of conditions that would
otherwise not have been found
•A disadvantage of the technique
is that a decision table is not
equivalent to complete test cases
containing step-by-step instructions of what
to do in what order
However, if we have a lot of
combinations, it may not be possible or
sensible to test every combination.

More Related Content

PPTX
Decision Tree and Tables
PPTX
Decision tree- System analysis and design
PPTX
Software Engineering- ERD DFD Decision Tree and Table
PDF
Tools of structured analysis
PPTX
8.unit-1-fds-2022-23.pptx
PPTX
Walkthroughs
PPT
Introduction to Design Algorithm And Analysis.ppt
PPTX
Data Flow Diagram (DFD)
Decision Tree and Tables
Decision tree- System analysis and design
Software Engineering- ERD DFD Decision Tree and Table
Tools of structured analysis
8.unit-1-fds-2022-23.pptx
Walkthroughs
Introduction to Design Algorithm And Analysis.ppt
Data Flow Diagram (DFD)

What's hot (20)

PPTX
Relational algebra ppt
PPT
Decision table
PPTX
Decision Table Based Testing
PPTX
Er model ppt
PPTX
Context model
PPTX
System design
DOCX
Behavioural modelling
PPT
Enhanced E-R diagram
PPTX
Data Designs (Software Engg.)
PPT
Unit 1 - Introduction to Software Engineering.ppt
PPT
REQUIREMENT ENGINEERING
PPTX
System Analysis and Design
PPT
Use case Diagram and Sequence Diagram
PPT
Object Oriented Analysis and Design
PPT
Rad model
PPTX
Component diagram
PPTX
Decision Support System - Management Information System
PDF
Software Engineering : Requirement Analysis & Specification
PPTX
Database Management System
PPT
Software Metrics
Relational algebra ppt
Decision table
Decision Table Based Testing
Er model ppt
Context model
System design
Behavioural modelling
Enhanced E-R diagram
Data Designs (Software Engg.)
Unit 1 - Introduction to Software Engineering.ppt
REQUIREMENT ENGINEERING
System Analysis and Design
Use case Diagram and Sequence Diagram
Object Oriented Analysis and Design
Rad model
Component diagram
Decision Support System - Management Information System
Software Engineering : Requirement Analysis & Specification
Database Management System
Software Metrics
Ad

Viewers also liked (20)

ODP
Decision tables
PPTX
DFD, Decision Table, Decision Chart, Structure Charts
PPT
L7 decision tree & table
PDF
Decision tree
PDF
Structure chart
PPT
Decision Table Training Session
PPTX
Decision tree powerpoint presentation templates
PDF
Decision Tables as a Programming Tool
PPT
Swe3643 2006 Decision Table Based Testing
PDF
Decision tree example problem
PPTX
Dfd examples
PDF
Problem solving and programming concept code 303106 bca 1st sem...
PDF
Course material: semantic decision tables for open information systems
ODP
Buenos Aires Decision Table presentation
PPTX
Levels of Requirements
XLS
Contingency Shopping Frenzy
PPT
Boundary value analysis
PDF
Evidence to Decision tables – 11th CE&B's research day presentation
PPT
10 si(systems analysis and design )
Decision tables
DFD, Decision Table, Decision Chart, Structure Charts
L7 decision tree & table
Decision tree
Structure chart
Decision Table Training Session
Decision tree powerpoint presentation templates
Decision Tables as a Programming Tool
Swe3643 2006 Decision Table Based Testing
Decision tree example problem
Dfd examples
Problem solving and programming concept code 303106 bca 1st sem...
Course material: semantic decision tables for open information systems
Buenos Aires Decision Table presentation
Levels of Requirements
Contingency Shopping Frenzy
Boundary value analysis
Evidence to Decision tables – 11th CE&B's research day presentation
10 si(systems analysis and design )
Ad

Similar to Decision table (20)

PPT
Ssad decision table
PPT
Decision table training session
PPTX
Mona Nasr-SAD-Lecture 3.pptx
PPT
decision table training session
PPTX
Modelling Logic with Decision Table
DOCX
C notes mca i sem 2011
DOCX
Decision tables
PPTX
UNDERSTANDING DECISION TABLES. BY SRISHTI GUPTA
PPT
Blackbox
PPT
Black_Box_testing_Decision_Table (1).ppt
PPT
Testcase design techniques final
ODP
2011-03-29 London - Decision tables in depth (Michael Anstis)
PPT
Data Mining
PPT
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
PDF
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
PPT
Software Testing-Dynamic testing technique-Mazenet solution
PDF
Implementing analytics? You need decision modeling and business rules
PDF
Deploying analytics with a rules based infrastructure pawcon sf 2011
Ssad decision table
Decision table training session
Mona Nasr-SAD-Lecture 3.pptx
decision table training session
Modelling Logic with Decision Table
C notes mca i sem 2011
Decision tables
UNDERSTANDING DECISION TABLES. BY SRISHTI GUPTA
Blackbox
Black_Box_testing_Decision_Table (1).ppt
Testcase design techniques final
2011-03-29 London - Decision tables in depth (Michael Anstis)
Data Mining
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
Software Testing-Dynamic testing technique-Mazenet solution
Implementing analytics? You need decision modeling and business rules
Deploying analytics with a rules based infrastructure pawcon sf 2011

Decision table

  • 2. Decision tables are used to model complicated programming logic. They can make it easy to see that all possible combinations of conditions have been considered.
  • 3.  Decision table provides a handy and compact way to represent complex business logic.  In a decision table, business logic is well divided into conditions, actions (decisions) and rules for representing the various components that form the business logic.  The tables are composed of 4 parts: conditions, actions, condition alternatives (each column is a rule), and actions for the rules.
  • 4. Definition  Decision tables are used to lay out in tabular form all possible situations which a business decision may encounter.  A decision table lists causes and effects in a matrix. Each column represents a unique combination.  Purpose is to structure logic Causes Values 1 2 3 4 5 6 7 8 Cause 1 Y, N Y Y Y Y N N N N Cause 2 Y, N Y Y N N Y Y N N Cause 3 Y, N Y N Y N Y N Y N Effects Effect 1 X X X Effect 2 X X X Combinations Cause = condition Effect = action = expected results
  • 5. What is a decision table ? Table representing complete set of conditional expressions  where expressions are mutually exclusive in a predefined area
  • 6. Why use decision tables ? Powerful visualisation  Compact and structured presentation Preventing errors is easier  Avoid incompleteness and inconsistency Modular knowledge organisation  Group related rules into single table  Combine tables to achieve decision
  • 7. Let’s take an example scenario for an ATM where a decision table would be of use. A customer requests a cash withdrawal. One of the business rules for the ATM is that the ATM machine pays out the amount if the customer has sufficient funds in their account or if the customer has the credit granted.
  • 8. A decision table makes the same requirements clearer to understand
  • 9. In a decision table, conditions are usually expressed as true (T) or false (F)  Above table contains three different business rules, and one of them is the “withdrawal is granted if the requested amount is covered by the balance.”  It is normal to create at least one test case per column, which results in full coverage of all business rules.
  • 10. Requirement: “Withdrawal is granted if requested amount is covered by the balance or if the customer is granted credit to cover the withdrawal amount”.
  • 11. Express conditions and resulting actions in a list so that they are either TRUE or FALSE. In this case there are two conditions, “withdrawal amount ≤ balance” and “credit granted”. There is one result, the withdrawal is granted.
  • 12. Step 2 : add Colum  Calculate how many columns are needed in the table. The number of columns depends on the number of conditions and the number of alternatives for each condition.  If there are two conditions and each condition can be either true or false, you need 4 columns. If there are three conditions there will be 8 columns and so on.  Mathematically, the number of columns is 2 conditions.  In this case 22 = 4 columns.
  • 13. Number of columns that is needed:
  • 14. Now is the time to fill in the T (TRUE) and F (FALSE) for the conditions  How do you do that? The simplest is to say that it should look like this:  Row 1: TF  Row 2: TTFF  Row 3: TTTTFFFF  For each row, there is twice as many T and F as the previous line.  Repeat the pattern above from left to right for the entire row.  In other words, for a table with 8 columns, the first row will read TFTFTFTF, the second row will read TTFFTTFF and the third row will read TTTTFFFF.
  • 15. Step 3: Reduce the table  Mark insignificant values with “-”.  If the requested amount is less than or equal to the account balance it does not matter if credit is granted.  In the next step, you can delete the columns that have become identical.
  • 18. Check for invalid combinations  Invalid combinations are those that cannot happen, for example, that someone is both an infant and senior. Mark them somehow, e.g. with “X”. In this example, there are no invalid combinations.  Finish by removing duplicate columns.  In this case, the first and third column are equal, therefore one of them is removed.
  • 19. . Step 4: determine action  Enter actions for each column in the table.  You will be able to find this information in the requirement.  Name the columns (the rules).  They may be named R1/Rule 1, R2/Rule 2 and so on, but you can also give them more descriptive names
  • 21. Step 5: Write test cases  Write test cases based on the table. At least one test case per column gives full coverage of all business rules.  Test case for R1: balance = 200, requested withdrawal = 200. Expected result: withdrawal granted.  Test case for R2: balance = 100, requested withdrawal = 200, credit granted. Expected result: withdrawal granted.  Test case for R3: balance = 100, requested withdrawal = 200, no credit. Expected Result: withdrawal denied.
  • 22. •Advantage of using decision tables is that they make it possible to detect combinations of conditions that would otherwise not have been found •A disadvantage of the technique is that a decision table is not equivalent to complete test cases containing step-by-step instructions of what to do in what order However, if we have a lot of combinations, it may not be possible or sensible to test every combination.