Select the correct alternative from the given choices.
The ratio of the number of students in three classes $A$, $B$ and $C$ is $3: 7: 8$. If ten students, are transferred from $C$ to $B, B$ will have 80 students. Find the total number of students in the three classes.
(A) 150
(B) 160
(C) 180
(D) 210