creating methods for sum, average, and area calculations in c#