A science class has a total of 34 students. The number of males is 4 more than the number of females. How many males and how many females are in the class?

Let x be the number of females in the class.

The number of males in the class is x + 4.
The total number of students is x + (x + 4) = 34.
Combining like terms, we get 2x + 4 = 34.
Subtracting 4 from both sides, we get 2x = 30.
Dividing both sides by 2, we get x = 15.
Thus, there are 15 males and 15 + 4 = <<15+4=19>>19 females in the class. Answer: \boxed{15, 19}.