auto commit
This commit is contained in:
@ -1477,7 +1477,7 @@ public class Client {
|
||||
|
||||
```java
|
||||
public interface Subject {
|
||||
void resisterObserver(Observer o);
|
||||
void registerObserver(Observer o);
|
||||
|
||||
void removeObserver(Observer o);
|
||||
|
||||
@ -1504,7 +1504,7 @@ public class WeatherData implements Subject {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resisterObserver(Observer o) {
|
||||
public void registerObserver(Observer o) {
|
||||
observers.add(o);
|
||||
}
|
||||
|
||||
@ -1535,7 +1535,7 @@ public interface Observer {
|
||||
public class StatisticsDisplay implements Observer {
|
||||
|
||||
public StatisticsDisplay(Subject weatherData) {
|
||||
weatherData.resisterObserver(this);
|
||||
weatherData.reisterObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1549,7 +1549,7 @@ public class StatisticsDisplay implements Observer {
|
||||
public class CurrentConditionsDisplay implements Observer {
|
||||
|
||||
public CurrentConditionsDisplay(Subject weatherData) {
|
||||
weatherData.resisterObserver(this);
|
||||
weatherData.registerObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2558,9 +2558,9 @@ public class Client {
|
||||
remoteControl1.off();
|
||||
remoteControl1.tuneChannel();
|
||||
RemoteControl remoteControl2 = new ConcreteRemoteControl2(new Sony());
|
||||
remoteControl2.on();
|
||||
remoteControl2.off();
|
||||
remoteControl2.tuneChannel();
|
||||
remoteControl2.on();
|
||||
remoteControl2.off();
|
||||
remoteControl2.tuneChannel();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user