Answer:
The number of students in the class is 21
Step-by-step explanation:
The first thing to consider is Andy.
Let x be the number of students who are taller than Andy.
Then the number of the rest students, excluding Andy, is 4x, according to the condition.
So, the total number of students in the class is (x + 4x + 1), or 5x+1.
Next, consider Violetta.
Let y be the number of students who are shorter than Violetta.
Then the number of the rest students, excluding her, is 3y, according to the condition.
So, the total number of students in the class is (y + 3y + 1), or 4y+1.
We see, that the number of students in the class MINUS one is a multiple of 4 (four) and of 5 (five), at the same time.
So, the number of students in the class is EITHER 20+1 = 21 OR 40+1 = 41, if consider couple of minimal values.
But 41 is excluded by the condition, leaving a UNIQUE ANSWER:
The number of students in the class is 21.