Those functions are poorly named. Proper names would be areaCircle, areaSquare and areaRectangle respectively. You can turn the names around, but putting area first makes for easier sorting.
Yeah I wasn't too careful with the naming here since that wasn't the problem of the exercise. I think that calculateAreaCircle would be better though, since methods should have a present tense verb.
Those functions are poorly named. Proper names would be
areaCircle
,areaSquare
andareaRectangle
respectively. You can turn the names around, but puttingarea
first makes for easier sorting.Yeah I wasn't too careful with the naming here since that wasn't the problem of the exercise. I think that
calculateAreaCircle
would be better though, since methods should have a present tense verb.I don't see any methods in that code.