There are two sections A and B of a class, consisting of 42 and 52 students respectively. If the average weight of section A is 40 kg and that of section B is 45 kg find the average weight of the whole class.
[A] 40
[B] 42.24
[C] 42
[D] 42.76