dp mediator pattern introduction as per wikipediathe mediator pattern provides unified interface to set of interfaces in subsystem this pattern is considered to be behavioral pattern due to the way it can alter the program' running behavior typicallymediator pattern is used in cases where many classes start communicating amongst each other to produce result when the software starts getting developedmore user requests get added and in turn more functionality need to be coded this results in increased interaction with in the existing classes and in addition of new classes to address new functionality with the increasing complexity of the systeminteraction between classes becomes tedious to handle and maintaining the code becomes difficult mediator pattern comes in as solution to this problem by allowing loose-coupling between the classesalso called as colleagues in the mediator design pattern the idea is that there would be one mediator class that is aware of the functionality of all the classes in the system the classes are aware of their functionality and interact with the mediator class whenever there is need of interaction between the classesa class sends information to the mediator and it is the responsibility of the mediator to pass this information to the required class thus the complexity occurring because of interaction between the classes gets reduced www testingperspective com