[Solved] What are getters/setters good for? [duplicate]
Getters and setters are used in order to prevent code outwith the class from accessing implementation details. Maybe today some piece of data is just a string, but tomorrow it has be created by joining two other strings together and also keeping a count of the number of times the string is retrieved (OK, contrived … Read more