In a class, the total numbers of boys and girls are in the ratio $4 : 3$. On one day it was found that $8$ boys and $14$ girls were absent from the class, and that the number of boys was the square of the number of girls. What is the total number of students in the class?
1. Let the number of boys be \(4x\) and the number of girls be \(3x\). This is given by the ratio \(4:3\).
2. On a particular day, \(8\) boys and \(14\) girls were absent. Therefore, the number of boys present is \(4x - 8\) and the number of girls present is \(3x - 14\).
3. It is given that the number of boys present is the square of the number of girls present. Therefore, we have the equation:
   \[
   4x - 8 = (3x - 14)^2
   \]
4. Expanding and simplifying the equation:
   \[
   4x - 8 = (3x - 14)^2
   \]
   \[
   4x - 8 = 9x^2 - 84x + 196
   \]
   \[
   0 = 9x^2 - 88x + 204
   \]
5. This is a quadratic equation in the form \(ax^2 + bx + c = 0\). We can solve it using the quadratic formula \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\), where \(a = 9\), \(b = -88\), and \(c = 204\):
   \[
   x = \frac{88 \pm \sqrt{(-88)^2 - 4 \cdot 9 \cdot 204}}{2 \cdot 9}
   \]
   \[
   x = \frac{88 \pm \sqrt{7744 - 7344}}{18}
   \]
   \[
   x = \frac{88 \pm \sqrt{400}}{18}
   \]
   \[
   x = \frac{88 \pm 20}{18}
   \]
   \[
   x = \frac{108}{18} \quad \text{or} \quad x = \frac{68}{18}
   \]
   \[
   x = 6 \quad \text{or} \quad x = \frac{34}{9}
   \]
6. Since \(x\) must be a natural number, we have \(x = 6\).
7. The total number of students in the class is \(4x + 3x = 7x\):
   \[
   7x = 7 \cdot 6 = 42
   \]

The final answer is \(\boxed{42}\).