Fluctuation formalism for elastic constants in hard-spheres-and-tethers systems