Comparison of the electron and muon data in extensive air showers with the expectations from a cosmic-ray composition and hadron interaction model