Skip to main content

Posts

Showing posts with the label mediator

Behavioral Patterns : Mediator

Properties: -            Provides communication between set of classes without communicating classes needing to know each other. Thus mediator pattern helps to reduce coupling. -            If number of communicating classes is high, mediator class may get too complicated. Implementation: -            A  mediator interface  declares actions of the mediator. -            Concrete Meadiator  implementations of mediator defines those actions. -            Concrete Colleagues  are classes that communicates. Java Standard Library Implementations: -            javax.swing.ButtonGroup Example Usage: //Create the radio buttons. JRadioButton ...