Since the class starts at 8:50 and ends at 15:00 then they are at school a total of 6 hours and 10 minutes.
To this we have to substract 20 minutes of the morning break, then we have 5 hours 50 minutes. Now to this we have to substract 1 hour.
Therefore the total time spent in class is 4 hours 50 minutes.