1类图
2java示例
{ main([] args) { Facade facade Facade(); facade.methodA(); System.out.println(); facade.methodB(); } }
{ SubSystemA systemA; SubSystemB systemB; SubSystemC systemC; Facade(){ .systemA SubSystemA(); .systemB SubSystemB(); .systemC SubSystemC(); } methodA(){ .systemA.doSomething(); .systemB.doSomething(); } methodB(){ .systemA.doSomething(); .systemC.doSomething(); } }
{ doSomething(){ System.out.println(); } }
{ doSomething(){ System.out.println(); } }
{ doSomething(){ System.out.println(); } }