Hi Steve,
Let's first see what we know
1/4 of the class likes strawberry
1/2 of the class likes chocolate
7 students like vanilla
There are no other flavors.
We have 1/4 + 1/2 = 3/4.
So the students who like vanilla have to represent the last 1/4 of the class.
We can set this up as a ratio
1 7
---- = -----
4 x
where x = number of students in Mrs. B's class
Solving for x,
x = 28
There are 28 students.