I have a subclass called Passenger which is extending from a Person class. I want to make the Passenger class a observable object. So I do it in this way,
class Person extends Observable{
}
class Passenger extends Person{
public void move(){
setChanged();
notifyObservers();
}
}
class Manager implements Observer{
@Override
public void update(Observable o, Object arg) {
}
}
Is it a bad practice to make the Person class Observable when I don't need observable functionality for that class? If so how can I change this?