title: Taking user input from a created class
body: <p>I'm new to programming, I have been reading Sams Teach Yourself C++ in 24 hours.  I just started learning classes and am confused on how to allow user input on private data.  I created the following class that returns the area of a Trapezoid. Any suggestions would be greatly appreciated.  </p>
  
  <pre><code>    class Trapezoid
  {
      //assigns a number to a variable
  private:
      int a = 20;
      int b = 25;
      int height = 30;
      int area;
  public:
      int getArea();
  };
  
  int Trapezoid::getArea()
  {
      // calculates the area and returns it.
      area = (a + b) / 2 + height;
      return area;
  }
  
  #include "AreaTrapezoid.hpp"
  #include &lt;iostream&gt;
  
  int main()
  {
      // accesses area inside the Trapeziod class.
      Trapezoid areaT;
      areaT.getArea();
  
  
      // displays the area result
      std::cout &lt;&lt; "The area of a Trapezoid: " &lt;&lt; areaT.getArea() &lt;&lt; std::endl; 
      std::cout &lt;&lt; system("pause"); 
      return 0;
  
  }
  </code></pre>