Let the total number of boys in the class be B.
Total number of students = 100
Number of girls = 40
Number of boys = B
Therefore, B + 40 = 100
B = 60
Let the total marks scored by all the boys in science be X.
Total marks scored by the boys = B × 75% = 0.75B
Total marks scored by the girls = 40 × 65% = 26
Total marks scored by the entire class = X + 26
The average marks of the class in science = (Total marks scored by the entire class) / (Total number of students)
= (X + 26) / 100
But X = 0.75B
Therefore, the average marks of the class in science = (0.75B + 26) / 100
= (0.75 × 60 + 26) / 100
= 56.5%
Therefore, the average marks of the class in science is 56.5%.