A Model for Calculating the Abundances of Neutron-Capture Elements in Metal-poor Stars