package br.unicamp.ic.example.subject;
import java.util.Vector;
import br.unicamp.ic.example.observer.Observer;
public class Subject {
private Vector list = new Vector();
public void attach(Observer o) {
list.add(o);
}
public void change_state() {
for ( Object o : list) {
Observer obs = (Observer) o;
obs.update();
}
}
}