My candidates for "const" + a simple question

CheckGuessValidity() could securely be a const, given that we don’t want it messing around with the variables already set. It should just check the validity and return a simple “yes or no” answer without messing around with any of the other variables we might pass as parameters in the future.

IsGameWon() could be a const too, basically the same case as the above, we just want a simple analysis answered with “yes or no”.

Reset() is not a candidate because the bare minimum requirement for us to reset the game (whether it be with the same secret isogram or a new one) is that we reset MyCurrentTry variable to 1, so it must be able to at least modify that one variable, even if we gonna keep the same secret isogram.

Any input or correction would be appreciated!

I also have a question: how do people in the context of a conversation, for example, refer to a variable within a class? Perhaps, member variable or class public/private variable ?

Thanks in advance!

1 Like

You got everything right about const candidates.

Could use either member variable, or class variable, or even member.
Although member is more general word for any member of a class, variable and functions.

1 Like

Privacy & Terms