Damped Lyman-Alpha and Lyman-Limit Absorbers in the Cold Dark Matter Model