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