The acceleration and heating of electrons at quasi-parallel shock waves are studied by means of a one-dimensional full particle computer simulation. Our simulation shows that the ion beam instability due to the anomalous cyclotron resonance excites whistler mode waves in the upstream region. When the Mach number becomes large beyond a critical value, the whistler wave packets do not appear. The electron acceleration parallel to the magnetic field results from the parallel electric fields caused by both the whistler mode waves and the electrostatic shock potential. The potential concerning the parallel electric field increases with Mach number below the critical Mach number but is relatively independent of the Mach number beyond the critical Mach number. This verifies that the contribution of the whistler waves to the parallel acceleration is as important as that of the electrostatic shock potential below the critical Mach number. Also, the spatial profile of the potential concerning the parallel electric field is clearly correlated with the magnetic field profile. Downstream, the electron temperature is anisotropic such that the parallel temperature is larger than the perpendicular temperature. The Mach number dependence of the electron parallel temperature can be evaluated from the viewpoint of a wave-particle interaction (current-driven instability).