ONE UPDATE FUNCTION COULD REPRESENT A CHANGE IN STATE

Qualified Writers
Rated 4.9/5 based on 2480 reviews

100% Plagiarism Free & Custom Written - Tailored to Your Instructions

In Observer Pattern as described in our class, the Subject class has one Update function that is called when there is a change in state. But what if we want our Subject to have multiple Update functions? For example, one Update function could represent a change in state for fields A, B, and C. Another Update function could represent a change in state for fields X, Y, and Z. Or in our weather station example, some Observers want to be notified when there is a change in the weather measurements, such as Temperature, Humidity, Pressure, while other Observers want to be noticed about the probability of a disaster occurring, such as Hurricane and Tornado.

In this assignment, please make the design first (using UML class diagram to indicate them) and then implement your design (write into runnable java code) and provide the client code to test two events of the weather measurements and disaster weather.

Price: £109

100% Plagiarism Free & Custom Written - Tailored to Your Instructions