Suppose we have three classes: AlarmClock, Beeper, and AlarmWindow. In the following you see an interaction showing an AlarmClock sending the display message to an AlarmWindow and the beep message to Beepers when it receives the alarm message (i.e. when the clock's alarm event occurs, it sends these messages).
Now assume you have been asked to change these classes so they collaborate according to the Observer pattern. Suppose that AlarmClocks are publishers and Beepers and AlarmWindows are observers.
a. What is the interface (name each method and give a short description of each method) that AlarmClocks must implement?
b. What is the interface (name each method and give a short description of each method) that Beepers and AlarmWindows must implement?
c. Draw a class diagram to show the relevant classes, methods, associations, and navigability for your adaptation to the Observer pattern.
d. Rewrite the above interaction to show how clock, b1, b2, and window interact according to the Observer pattern (show the messages sent when the clock's alarm event occurs).