Chapter 48. Decision Table

Represent a combination of conditional statements in a tabular form.

image

When you have code that composes several conditional statements, it can often be hard to follow exactly what combinations of conditions lead to what outcomes.

A Decision Table improves understandability by representing the group of conditions as a table, where each column shows the outcome for a particular combination of conditions.

48.1 How It Works

A decision table is divided into two sections: conditions and consequences. Each condition row indicates the state of that condition; for a simple two-value Boolean condition, each cell in the row will ...

Get Domain Specific Languages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.