  By mean of generalized Fourier series and Parseval's equality in weighted
$L^{2}$--spaces, we derive a sharp energy estimate for the wave equation in a
bounded interval with a moving endpoint. Then, we show the observability, in a
sharp time, at each of the endpoints of the interval. The observability
constants are explicitly given. Using the Hilbert Uniqueness Method we deduce
the exact boundary controllability of the wave equation.
