This way the state is encapsulated in the object and the required changes are done in one place. This makes the code reusable across all functions making it easier to implement better monitor alteration code.
This way the state is encapsulated in the object and the required changes are done in one place. This makes the code reusable across all functions making it easier to implement better monitor alteration code.