some example for java design pattern