For a given perimeter, the area will be maximized when all the sides are the same length, which makes it actually a square. A square is still a rectangle, though! So, if you know the perimeter, divide it by four to determine the length of each side. Then multiply the length times the width to get the area.
As there are 13 girls and 15 boys in the class, there are a total of 28 students (13 + 15). Thus, while the average height of these is 161 cm, the total height in centimeters of all the students is 4.508 centimeters (161 x 28).
Now, 1 centimeter is equal to 0.393 inches. Thus, since 4.508 x 0.393 equals 1,771.6, the height in inches of the entire class measured together is 1,771.6 inches.