| 11 | public class GreenhouseControls extends Controller { |
| 12 | private boolean light = false; |
| 13 | public class LightOn extends Event { |
| 14 | public LightOn(long delayTime) { |
| 15 | super(delayTime); |
| 16 | } |
| 17 | @Override public void action() { |
| 18 | // Put hardware control code here to |
| 19 | // physically turn on the light. |
| 20 | light = true; |
| 21 | } |
| 22 | @Override public String toString() { |
| 23 | return "Light is on"; |
| 24 | } |
| 25 | } |
| 26 | public class LightOff extends Event { |
| 27 | public LightOff(long delayTime) { |
| 28 | super(delayTime); |
nothing calls this directly
no outgoing calls
no test coverage detected