I think the Obervable class in java is a pretty poorly thought out class. He really wants to be in the interface, in my opinion.
However, instead of the Person extending from the Observed, you can use the composition at the Passenger level.
"" :
private Observable observable = new Observable();
public void addObserver(Observer o) {
observable.addObserver(o);
}
public void notifyObservers() {
observable.notifyObservers();
}
. .
:
java.util.Observable ?