Skip to content

Instantly share code, notes, and snippets.

@Sean-Bradley
Created August 17, 2020 18:16
Show Gist options
  • Save Sean-Bradley/9f9229ebe5e788fabbf98fef2ebc8171 to your computer and use it in GitHub Desktop.
Save Sean-Bradley/9f9229ebe5e788fabbf98fef2ebc8171 to your computer and use it in GitHub Desktop.
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