Name: Anonymous 2010-09-18 22:50
Suppose I have a private boolean variable named isCool.
What should the setter and getter functions for this variable be called? setIsCool()? getIsCool() is not as nice sounding as simply isCool().
I would make the variable public, but how do I know with absolute certainty that I won't need to do some additional stuff every time before setting or getting, which would want a function to handle that without breaking the interface.
What should the setter and getter functions for this variable be called? setIsCool()? getIsCool() is not as nice sounding as simply isCool().
I would make the variable public, but how do I know with absolute certainty that I won't need to do some additional stuff every time before setting or getting, which would want a function to handle that without breaking the interface.