Tire Pressure Kata

You are working on software for a Formula 1 racing car. The car has a sensor that detects tire pressure while it is driving around the track. You are working on the back-end software used by the technicians at the side of the track. The tire pressure sensor class is already working, it has a method ‘popNextValue’ which returns a double indicating the current tire pressure in PSI. This method makes an out-of-process call to the actual sensor in the moving racing car, and you can’t call it from a unit test.

Your task is to develop the code that will regularly check the tire pressure and activate the alarm when the pressure falls outside the range 17-21 PSI.

This is usually done as a refactoring kata. See Tire Pressure.

Referenced in these Learning Hours: