A farmer wishes to enclose a rectangular pasture with 360ft of fence. Find the dimensions that give the maximum area in these situations:
a. The fence is on all sides of the pasture.
b. The fence is on three sides of the pasture and the fourth side is bounded by a wall.