Search code examples
table-driven

How to use Decision Tables to help your application


I learned some time ago about Decision Trees and Decision tables. I feel that Decision Tables can help with conditional If-Then-Else statements. In particular, I feel that Decision Tables have no side-effects, for example, if you didn't notice that you need one more "else if" statement.

But I am not sure how I can implement it. Arrays? Database Tables? Does anyone even use Decision Tables in their code, nowadays?


Solution

  • I would highly recommend chapter 18 of Code Complete.

    You could also check this post What Are Table Driven Methods