Created
August 17, 2020 18:16
-
-
Save Sean-Bradley/9f9229ebe5e788fabbf98fef2ebc8171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SubSystemClassA: | |
@staticmethod | |
def method(): | |
return "A" | |
class SubSystemClassB: | |
@staticmethod | |
def method(): | |
return "B" | |
class SubSystemClassC: | |
@staticmethod | |
def method(): | |
return "C" | |
# facade | |
class Facade: | |
def __init__(self): | |
self.sub_system_class_a = SubSystemClassA() | |
self.sub_system_class_b = SubSystemClassB() | |
self.sub_system_class_c = SubSystemClassC() | |
def create(self): | |
result = self.sub_system_class_a.method() | |
result += self.sub_system_class_b.method() | |
result += self.sub_system_class_c.method() | |
return result | |
# client | |
FACADE = Facade() | |
RESULT = FACADE.create() | |
print("The Result = %s" % RESULT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment