The solid cylinder has an outer radius $R$, height $h$ and is made from a material having a density that varies from its center as $\rho=k+a r^{2},$ where $k$ and $a$ are constants. Determine the mass of the cylinder and its moment of inertia about the $z$ axis.