updated Animal factory to handle body component as an Abstract Class instead of an interface