class SubsystemA public void A1 class SubsystemB public void B1 class

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class SubsystemA
{
public void A1()
{}
}
class SubsystemB
{
public void B1()
{}
}
class SubsystemC
{
public void C1()
{}
}
public class Facade
{
SubsystemA subsystemA;
SubsystemB subsystemB;
SubsystemC subsystemC;
public Facade(SubsystemA sa, SubsystemB sb, SubsystemC sc)
{
subsystemA = sa;
subsystemB = sb;
subsystemC = sc;
}
public void Operation1()
{
subsystemA.A1();
subsystemB.B1();
subsystemC.C1();
}
public void Operation2()
{
subsystemB.B1();
subsystemC.C1();
}
}
class Client
{
public void Main()
{
Facade facade = new Facade(new SubsystemA(), new SubsystemB(), new SubsystemC());
facade.Operation1();
facade.Operation2();
}
}