title: Creating a Rectangle class
body: <p>I really don't understand classes very much and any help would be great.</p>
  
  <p>Rectangle class should have the following private data attributes:</p>
  
  <ul>
  <li><code>__length</code> </li>
  <li><code>__width</code></li>
  </ul>
  
  <p>The Rectangle class should have an  <code>__init__</code> method that creates these attributes and initializes them to 1. It should also have the following methods:</p>
  
  <ul>
  <li><p><code>set_length</code> – this method assigns a value to the <code>__length</code> field</p></li>
  <li><p><code>set_width</code> – this method assigns a value to the <code>__width</code> field</p></li>
  <li><p><code>get_length</code> – this method returns the value of the <code>__length</code> field</p></li>
  <li><p><code>get_width</code> – this method returns the value of the <code>__width</code> field</p></li>
  <li><p><code>get_area</code> – this method returns the area of Rectangle</p></li>
  <li><p><code>__str__</code> –  this method returns the object’s state </p></li>
  </ul>
  
  <p></p>
  
  <pre><code>class Rectangle:
  
    def __init__(self):
        self.set_length = 1
        self.set_width = 1
        self.get_length = 1
        self.get_width = 1
        self.get_area = 1
  
  def get_area(self):
      self.get_area = self.get_width * self.get_length
      return self.get_area
  
  
  def main():
  
    my_rect = Rectangle()
  
    my_rect.set_length(4)
    my_rect.set_width(2)
  
    print('The length is',my_rect.get_length())
    print('The width is', my_rect.get_width())
  
    print('The area is',my_rect.get_area())
    print(my_rect)
  
    input('press enter to continue')
  </code></pre>