1) The null solution as there were no students in the class, as the teacher was possibly on paid suspension under a union contract for whatever reason.
Assuming no fractional gender identification issues, there would have been at least 140 students in the class, violating No Child Left Behind. Although, some undergraduate classes at state universities commonly have 200 to 300 students, so I assume this to be a college level class.
2) Minimum girls wearing shorts: 62/140.
S= 18/28*140 = 90 wearing shorts
B= Boys in class 1/5*140 = 28
G= Girls in class 140-28 = 112
Since G>S, then all girls can not be wearing shorts, so up to 28 boys
Min = (90-28)/140 = 62 or 44.29%
3) Maximum girls wearing shorts: 90/140
Since G>S, then no boys wear shorts, but not all girls
Max = (90)/140 = 90 or 64.29%
4) An infinite series of ranges implied by solutions #2 and #3, where the previous minimum and maximum are multiplied by integers.
Answers 1 and 4 might be confusing and should not not be expected of a fifth grader, but they come from my engineering math class "Non-Linear, second order differential equations"
I wish they had challenged me like this in fifth grade; I might have advanced more than I have.