Calculate the area and perimeter of a square