Step 1: Set up variables.
Let the class have n students with total height sum S, so the average height is A = S/n.
Step 2: Translate Statement I into an equation.
Excluding the tallest person (height 56 cm) drops the average by 1 cm: (S - 56)/(n-1) = A - 1. Substituting S = nA: nA - 56 = (A-1)(n-1) = nA - n - A + 1. The nA terms cancel, leaving -56 = -n - A + 1, i.e. n + A = 57. This is one equation in two unknowns (n and A), so Statement I alone cannot pin down A.
Step 3: Translate Statement II into an equation.
Excluding the shortest person (height 42 cm) raises the average by 1 cm: (S - 42)/(n-1) = A + 1. Substituting S = nA: nA - 42 = (A+1)(n-1) = nA - n + A - 1. The nA terms cancel, leaving -42 = -n + A - 1, i.e. n - A = 41. This is again one equation in two unknowns, so Statement II alone cannot pin down A either.
Step 4: Combine both statements.
With both equations available, n+A=57 and n-A=41, add them to eliminate A: 2n=98, so n=49. Substitute back into n+A=57 to get A = 57-49 = 8. Both the class size and the average height are now uniquely fixed.
Step 5: Conclusion.
Statement I alone leaves two unknowns, and Statement II alone leaves two unknowns; only by combining both equations do n and A become uniquely solvable. So the two statements together are necessary to answer the question, matching option (3).