learn Design Pattern in Java