> Design Patterns > Mediator > Mediator Design Pattern In C++

Mediator Design Pattern In C++

Mediator design pattern in C++ for controlling the interaction between different objects.


Mediator design pattern In C++

Output

ConcreteColleague2::ReceiveMessage()...Message = I am colleague1
ConcreteColleague1::ReceiveMessage()...Message = I am colleague2


Suresh Kumar Srivastava is founder of online learning site coursegalaxy.com and author of popular books C In Depth, Data Structures Through C In Depth. He has 18+ years experience in industry and worked on architecture and design of multiple products. This article Mediator Design Pattern In C++ is from his Design Patterns course.