Implement a function to calculate the area/volume of an element. Consider different types of elements.