???????
????????? (Facade)
??????????е??????????????μ???棬?????????????????????????????????????????????á?
?????????????????????
??????

?????-????????
????Facade : ????????????????????????????????????????????????
class Class1 {
public void op1() {
System.out.println("????1");
}
}
class Class2 {
public void op2() {
System.out.println("????2");
}
}
class Class3 {
public void op3() {
System.out.println("????3");
}
}
????Subsystem Classes : ?????????????????? Facade ??????£????? Facade ?????????????
class Facade {
private Class1 one = new Class1();
private Class2 two = new Class2();
private Class3 three = new Class3();
public void op1() {
System.out.println("Facade op1()");
one.op1();
}
public void op2() {
System.out.println("Facade op2()");
two.op2();
}
public void op3() {
System.out.println("Facade op3()");
three.op3();
}
public void Method() {
System.out.println("Facade Method()");
three.op3();
two.op2();
one.op1();
}
}