Java?????-?????
???????????? ???????[ 2015/11/11 13:18:05 ] ??????????????? ???????????
???????
????????? (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();
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11