Refactoring Decision Tables - Gnorion/BizVR GitHub Wiki

Refactoring Decision Tables

Consider the following business rules

R1: if length < 10 then price is 1 
R2: if length >= 10 and width < 5 then price is 2
R3: if length >= 10 and width >= 5 then price is 3 
R4: if height < 5 then category is 'A' 
R5: if height >= 5 and density >= 1 then category is 'B'
R6: if height >= 5 and density < 1 then category is 'C' 
	

They can be represented as a single decision table:

image

But they can also be represented as two separate tables like this:

image image