标签:部门 color cad str system method public int ring
统一流程
package structural; public class FacadeMain { public static void main(String[] args) { Facade f = new Facade(); f.method(); } } class Facade{ public Facade(){ System.out.println("甲要去综合部门办理营业执照!"); } SubSystemA a = new SubSystemA(); SubSystemB b = new SubSystemB(); SubSystemC c = new SubSystemC(); public void method(){ a.methodA(); b.methodB(); c.methodC(); } } class SubSystemA{ public void methodA(){ System.out.println("去a部门办了第一道手续!"); } } class SubSystemB{ public void methodB(){ System.out.println("去b部门办了第二道手续!"); } } class SubSystemC{ public void methodC(){ System.out.println("去c部门办了最后一道手续,领了证件!"); } }
标签:部门 color cad str system method public int ring
原文地址:https://www.cnblogs.com/zzlcome/p/11423336.html