A student investigates the compression of a spring used inside a mechanical switch.
Figure 1 shows the experimental setup used to compress the spring.

The student applies a downward force on the spring to compress it. This force is recorded by the digital balance.
Describe how the student can determine the change in length of the spring using this equipment.