The Strategy Design pattern implemented in Java