This doesn’t compile. Submit it as-is and read the error before changing anything – it’s the exact const
violation from the lesson, just triggered by a member function instead of a plain pointer.
deposit is marked const, which promises it won’t modify the object – and then its whole job is modifying
balance. Those two things can’t both be true. The fix isn’t in the arithmetic; it’s removing const from
deposit’s own declaration, the same “recognize when const is simply wrong for this function” lesson as Module
2’s pointer-focused version of this exact exercise.