So I don't know if you any of you have been/goes on the NewBoston.Com (great resource by the way), but I was watching this video and the teacher was saying how you can access private info using public functions...
This is the video: http://www.youtube.com/watch?v=jTS7JTud1qQ
And of course, just skip to the end to get to the gist of it.
The thing I don't get though, is how can you access private information using a public function. If you make a function that's public that allows anyone to set the name, and get that name, then isn't it just public anyway?, Wouldn't anyone be able to mess my code and my desired output?