EN: The Facade's methods are convenient shortcuts to the sophisticated functionality of the subsystems. However, clients get only to a fraction of a subsystem's capabilities. RU: Методы Фасада удобны для быстрого доступа к сложной функциональности подсистем.
(self)
| 43 | self._subsystem2 = subsystem2 or Subsystem2() |
| 44 | |
| 45 | def operation(self) -> str: |
| 46 | """ |
| 47 | EN: The Facade's methods are convenient shortcuts to the sophisticated |
| 48 | functionality of the subsystems. However, clients get only to a fraction |
| 49 | of a subsystem's capabilities. |
| 50 | |
| 51 | RU: Методы Фасада удобны для быстрого доступа к сложной функциональности |
| 52 | подсистем. Однако клиенты получают только часть возможностей подсистемы. |
| 53 | """ |
| 54 | |
| 55 | results = [] |
| 56 | results.append("Facade initializes subsystems:") |
| 57 | results.append(self._subsystem1.operation1()) |
| 58 | results.append(self._subsystem2.operation1()) |
| 59 | results.append("Facade orders subsystems to perform the action:") |
| 60 | results.append(self._subsystem1.operation_n()) |
| 61 | results.append(self._subsystem2.operation_z()) |
| 62 | return "\n".join(results) |
| 63 | |
| 64 | |
| 65 | class Subsystem1: |
no test coverage detected