Practice Design Pattern for Java