title: How do you access private variables using public functions?
body: <p>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...</p>
  
  <p>This is the video:
  <a href="http://www.youtube.com/watch?v=jTS7JTud1qQ" rel="noreferrer">http://www.youtube.com/watch?v=jTS7JTud1qQ</a></p>
  
  <p>And of course, just skip to the end to get to the gist of it.</p>
  
  <p>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?</p>