Consider the following (contrived!) class:
void display() const;
void double_X(); // x = x^2
void double_Y(); // y = y^2
I can protect X and Y from mutation in the display function by defining it
How would I protect Y from mutation whilst inside the double_X function and
likewise X whilst inside double_Y?
Any help gratefully received!