Since the wave equation involves a second derivative in time, two initial conditions are necessary: initial displacement $U(x,0)$ and initial velocity $U_t(x,0)$. I don't see the initial velocity condition specified in your question. This leads me to suspect that there is something wrong with the tutorial you linked to...
As I suspected, the code in the tutorial is for the heat equation, not the wave equation. In order to solve the wave equation, you will also need to use a different time stepping scheme altogether. The one implemented in the tutorial will not work for the wave equation.