Have functions/methods to access internal variables means that how the variables are represented internally is irrelevant to the user. The user simply says .getHealth() and they expect the health returned. So in the next release you can store health as a character and fix your getHealth() to conver the character to an integer, and the user of your class never knows, or needs to know this change. And their code will continue to compile correctly without changing it.