Answer: There are 8 11-year-old students and 22 12-year-old students in Liam's class.
Explanation:
Let's call the number of 11-year-old students in class x. Then, the number of 12-year-old students in the class would be 30 - x.
The total number of years that the 11-year-old students represent is 11 * x.
The total number of years that the 12-year-old students represent is 12 * (30 - x).
The sum of all the years is 352, so we can set up an equation based on the above information:
11x + 12(30 - x) = 352
Expanding the second term on the left-hand side:
11x + 360 - 12x = 352
Combining like terms:
-x + 360 = 352
Subtracting 360 from both sides:
-x = -8
Dividing both sides by -1:
x = 8
So, there are 8 11-year-old students and 30 - 8 = 22 12-year-old students in Liam's class.