For each of the following cases, identify which DesignPattern should be used and why?
a) There are two objects,“A” and “B”. Both of them are interactingwith each other in such a way that the state of the object“B”depends on the state of the object “A”and it is the responsibility of “B” to synchronize itsstate whenever “A” changes.
b) A client wants to buildSimulation Software, which is used to show customer the preview ofinterior decoration of rooms. Thesoftware presents rooms as objectand it can interact with other objects. These objects, likeTelevision, Sofa etc, can change their state. The client hasdeterminedthat there can be limited number of
operations that can be performed on the objects, e.g. a TVcan be placed at either of the walls of the rooms etc. Theinteraction between the objects should below.