-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppMain.java
More file actions
27 lines (21 loc) · 905 Bytes
/
Copy pathAppMain.java
File metadata and controls
27 lines (21 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package TheObserverPattern;
import TheObserverPattern.Object.CurrentConditionsDisplay;
import TheObserverPattern.Object.ForecastDisplay;
import TheObserverPattern.Object.StatisticsDisplay;
import TheObserverPattern.Subject.Subject;
import TheObserverPattern.Subject.SubjectIMPL;
/**
* Created by ud on 22/3/17.
*/
public class AppMain {
public static void main(String args[]){
SubjectIMPL weatherData = new SubjectIMPL();
CurrentConditionsDisplay currentDisplay =
new CurrentConditionsDisplay(weatherData);
StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);
ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
weatherData.setMeasurements(80, 65, 30.4f);
weatherData.setMeasurements(82, 70, 29.2f);
weatherData.setMeasurements(78, 90, 29.2f);
}
}