Exercise (FH): Replace Sensor¶
Requirement¶
As a followup to Exercise (FH): Introducing a Sensor Class, let’s say we want to
replace W1Sensor
with an instance of ConstantSensor
(from
<constant-sensor.h>
).
Make the change: replace every mention of
W1Sensor
with itsConstantSensor
counterpart.What do you notice? Respectively, which part of the program did you not expect to change?