mirror of
https://github.com/rjNemo/design-patterns
synced 2026-06-06 02:26:40 +00:00
14 lines
337 B
Python
14 lines
337 B
Python
"""The client code."""
|
|
from behavioral.mediator.components import Component1, Component2
|
|
from behavioral.mediator.concrete_mediator import ConcreteMediator
|
|
|
|
c1 = Component1()
|
|
c2 = Component2()
|
|
mediator = ConcreteMediator(c1, c2)
|
|
|
|
print("Client triggers operation A.")
|
|
c1.do_a()
|
|
|
|
print("")
|
|
print("Client triggers operation D.")
|
|
c2.do_d()
|