Energy eigenvalues of a bounded centrally located harmonic oscillator