samples of design pattern by JAVA