@@ -0,0 +1,867 @@
+// --------------------- abstract class%0A%0Apublic abstract class Man %7B%0A    public abstract void sayHello();%0A    public abstract void sayBye();%0A%0A    public void talk() %7B%0A        sayHello();%0A        sayBye();%0A    %7D%0A%7D%0A%0A// --------------------- concrete class%0A%0Apublic class BlackMan extends Man %7B%0A    public void sayHello() %7B%0A        System.out.println(%22BlackMan sayHello...%22);%0A    %7D%0A%0A    public void sayBye() %7B%0A        System.out.println(%22BlackMan sayBye...%22);%0A    %7D%0A%7D%0A%0Apublic class WhiteMan extends Man %7B%0A    public void sayHello() %7B%0A        System.out.println(%22WhiteMan sayHello...%22);%0A    %7D%0A%0A    public void sayBye() %7B%0A        System.out.println(%22WhiteMan sayBye...%22);%0A    %7D%0A%7D%0A%0A// --------------------- test code%0A%0Apublic static void main(String%5B%5D args) %7B%0A    Man blackMan = new BlackMan();%0A    Man whiteMan = new WhiteMan();%0A%0A    blackMan.talk();%0A    whiteMan.talk();%0A%7D%0A

add template pattern