auto commit

This commit is contained in:
CyC2018
2018-12-16 22:12:44 +08:00
parent 2967bdb192
commit 5e0c5ef1f0
2 changed files with 24 additions and 18 deletions

View File

@ -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();
}
}
```