| ARocketLaunchingCounterObserver.java |
package lectures.mvc;
import util.annotations.WebDocuments;
// A non view observer faking a rocket liftoff in response to the counter reaching 0
@WebDocuments({"Lectures/Mvc.pptx", "Lectures/Mvc.pdf", "Videos/Mvc.avi"})
public class ARocketLaunchingCounterObserver implements CounterObserver {
public void update(Counter counter) {
if (counter.getValue() == 0) {
launch();
}
}
private void launch() {
System.out.println("LIFT OFF!!!");
}
}