Let's denote the number of student tickets sold as \( s \). Since the drama class sold 30 more adult tickets than student tickets, we can denote the number of adult tickets sold as \( s + 30 \).
The cost of adult tickets is $8 and the cost of student tickets is $4. Therefore, we can express the total revenue from ticket sales as:
\[ 8(s + 30) + 4s = 840 \]
Now, let's simplify and solve this equation:
- Distribute the \( 8 \):
\[ 8s + 240 + 4s = 840 \]
- Combine like terms:
\[ 12s + 240 = 840 \]
- Subtract 240 from both sides:
\[ 12s = 600 \]
- Divide by 12:
\[ s = 50 \]
Now, recall that the number of adult tickets sold is \( s + 30 \):
\[ s + 30 = 50 + 30 = 80 \]
Thus, the drama class sold 80 adult tickets.