-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfacade.py
More file actions
32 lines (24 loc) · 673 Bytes
/
Copy pathfacade.py
File metadata and controls
32 lines (24 loc) · 673 Bytes
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
class SubsystemA:
def method1(self):
print('SubsystemA method1 ...')
def method2(self):
print('SubsystemA method2 ...')
class SubsystemB:
def method1(self):
print('SubsystemB method1 ...')
def method2(self):
print('SubsystemB method2 ...')
class Facade:
def __init__(self):
self._subsystem_A = SubsystemA()
self._subsystem_B = SubsystemB()
def method(self):
self._subsystem_A.method1()
self._subsystem_A.method2()
self._subsystem_B.method1()
self._subsystem_B.method2()
def main():
facade = Facade()
facade.method()
if __name__ == "__main__":
main()