Exemple #1
0
 @Override
 public void off(ElectricAppliance ea) {
   ea.setState(StateOff.getInstance());
   ea.getWork().interrupt();
   System.out.println(ea.getType() + " выключен/а");
 }
Exemple #2
0
 @Override
 public void on(ElectricAppliance ea) {
   System.out.println(ea.getType() + " уже включен/а");
 }