Collective oscillations of a classical gas confined in harmonic traps