The following grouped data show the scores obtained by 40 students in a quiz:
| Class interval | Frequency |
| 0–10 | 4 |
| 10–20 | 9 |
| 20–30 | 11 |
| 30–40 | 10 |
| 40–50 | 6 |
Answer the following:
(i) Identify the median class.
(ii) Write the cumulative frequency of the class just preceding the median class.