[Cs3] CS3 Mediator
Mikhail Nesterenko
mnestere at kent.edu
Mon Dec 8 11:22:39 EST 2025
>
> You mentioned, as well as states on the slides and the final exam
> topics, the mediator design pattern having a push and pull
> implementation similar to how observer does. There is only one
> example we went over in class and on the web page, and I would like
> to clarify which method it uses, I assume it is push since the main
> communication is done through the string received from user input
> and then that string is pushed to other methods for communication
> with the mediator to tell whether planes are cleared or not, but
> then in another method 'observe', we pull the status of whether the
> flights are clear or not using a lambda and STL algorithm, so does
> the atc.cpp example use both push and pull methods, or does it use
> one distinct method?
>
Well, there are links to both the colleagues (flights) to the mediator
(tower) and from tower to the colleagues. However, the information is
sent one way: tower --> flights. So I think it is a push communication
method.
Note also, that this is not a "pure" mediator since there is mostly
tower -> flight communication as opposed to flight <--> flight thourgh
mediator.
Thanks,
--
Mikhail
More information about the cs3
mailing list