Reputation: 1771
This is the question I am being asked.
Implement the following two static methods. Note that, although the two methods compute the same function, the first one clears the given NaturalNumber while the second one restores it. (naturalnumber is a class that makes a special kind of number)
I am not looking for the answer, just a clarification of what they mean by clear vs restore. I have posted a link to the complete assignment below.
Upvotes: 0
Views: 474
Reputation: 234795
This isn't standard terminology; it probably has something to do with the implementation of NaturalNumber
. As a guess, I'd say that the method that clears n
will return with n
set to all zeroes, while the one that restores n
will return with n
unchanged (or perhaps changed while the method executes but then put back the way it was before it returns).
Just to be sure, ask your TA for clarification.
Upvotes: 1