Elastic and inelastic electron scattering by cadmium