strategy-pattern This strategy pattern by coupling-separation is a very important technique in many cases. And the code is programmed in Java.