Calculating Area and Perimeter of Rectangles