DesignPattern code.

DesignPattern code.