To find the total number of students in the seventh-grade class, we need to add the number of students who preferred apples to the number who preferred oranges.
From the table:
- Number of students who preferred apples in 7th grade: 19
- Number of students who preferred oranges in 7th grade: 12
Total number of students in the 7th grade = Number of students who like apples + Number of students who like oranges = 19 + 12 = 31
Therefore, there are 31 students in the seventh-grade class.