The temperature of a room is controlled by turning a fan off and on. The current solution in place uses fuzzy logic to determine how long per minute to turn the fan on and how long to leave it off. Regulating the temperature in this way is slow as it causes more switching than necessary which increases wear on physical components. You are required to produce a more efficient solution in Java (e.g. using Java ML). No GUI is required only the code which when given periodic temperature readings decides when to turn the fan off or on.