The cost of textbooks for a school increases with the average class size. Identify the independent and dependent quantity in the situation.
A: cost; number of clases
B: cost; average class size
C: number of classes; average class size
D: average class size; cost