There is observational evidence showing that stellar and solar flares occur
with a similar circumstance, although the former are usually much more ene
rgetic. It is expected that the bombardment by high-energy electrons is one
of the chief heating processes of the flaring atmosphere. In this paper we
study how a precipitating electron beam can influence the line profiles of
Ly alpha, H alpha, Ca II K and lambda 8542. We use a model atmosphere of a
dMe star and make non-LTE computations taking into account the non-thermal
collisional rates owing to the electron beam. The results show that the fo
ur lines can be enhanced to different extents. The relative enhancement inc
reases with increasing formation height of the lines. Varying the energy fl
ux of the electron beam has different effects on the four lines. The wings
of Ly alpha and H alpha become increasingly broad with the beam flux; chang
e of the Ca II K and lambda 8542 lines, however, is most significant in the
line centre. Varying the electron energy (i.e. the low-energy cut-off for
a power-law beam) has a great influence on the Ly alpha line, but little on
the H alpha and Call lines. An electron beam of higher energy precipitates
deeper, thus producing less enhancement of the Ly alpha line. The Ly alpha
/H alpha flux ratio is thus sensitive to the electron energy.