Exercise 1

1 If-Equation

Write a class Lights that sets the variable switch (integer) to one if the lights are on and zero if the lights are off.



1.1


1.1.1 Simulation of Lights