Have you tried the code to see whether it compiles?
Remember that this is a cert exam preparation book; cert exam questions often incorporate features likely to confuse the unwary. It wouldn't have confused you had the code said this:-
I have introduced some new problems. Not only would that documentation comment make the question too easy, but also it exposes private implementation details, and describes a weakness of your design in such a manner as to make that weakness awkward to correct
I shall let you make a suggestion as to how you would improve the documentation comment so the weakness is easier to correct.
The strange parameter problem is no significant difference from this sort of method in my Kettle class:-
There is no
degrees field, but the
degrees parameter is used to alter the value of the
temperature field without heating the
water hotter than boiling. In the case of MouseHouse, the field is
final, so it must not be assigned in a method.
Adding discussion to our exams forum.