Quote:
Originally posted by jmiller
if i have one variable in a class, and all i need of that variable is just to set it or get it, should i still make it private and then have accesor functions? I've heard this is proper decorum, but it seems like a lot of extra code for just a variable, when it would be just as easy to put it in the public section. if you would, post your thoughts
thanks
Accessors are the way to go, in my opinion. It may seem like a lot of work now, but it gets you in the habit of abstracting your objects.