The example code of design pattern