title: Accessors and Mutators C++
body: <p>I am currently trying to learn C++ and following an instruction. I've researched on mutators and accessors but I need a simple explanation. </p>
  
  <pre><code>class Customer
  {
  public:
      Customer();
      ~Customer();
  
  private:
      string m_name;
      int m_age;
  
  };
  </code></pre>
  
  <p>Right the code above is in a header file. Within the instructions it is asking me to set a public accessors and mutator for both data. How do I do this?</p>
  
  <p>Also it mentions checking the age is not negative in the mutator. I know how to implement the code but I'm just confused on where to place it. Do I place the validation in this header file? or in the .cpp? or in the main method?</p>
  
  <p>I know this sounds all silly and I'm sure simple but I'd like to try and understand this.</p>