Beispiel #1
0
 public void beginStudy(double level) {
   System.out.println("Get ready to study...");
   lightStand.on();
   lightStand.setHeight(level);
   amp.on();
   amp.setLight(4);
 }
Beispiel #2
0
 public void listenToRadio(double frequency) {
   System.out.println("Tuning in the airwaves...");
   tuner.on();
   tuner.setFrequency(frequency);
   amp.on();
   amp.setVolume(5);
   amp.setTuner(tuner);
 }
Beispiel #3
0
 public void watchMovie(String movie) {
   System.out.println("Get ready to watch a movie...");
   projector.on();
   projector.wideScreenMode();
   amp.on();
   amp.setDvd(dvd);
   amp.setVolume(5);
   dvd.on();
   dvd.play(movie);
 }
Beispiel #4
0
 public void endMovie() {
   System.out.println("Shutting movie theater down...");
   projector.off();
   amp.off();
   dvd.stop();
   dvd.eject();
   dvd.off();
 }
Beispiel #5
0
 public void endStudy() {
   System.out.println("Shutting down study...");
   lightStand.off();
   amp.off();
 }
Beispiel #6
0
 public void endRadio() {
   System.out.println("Shutting down the tuner...");
   tuner.off();
   amp.off();
 }