title: Setting Objective-C instance variable values
body: <p>I have the following code:</p>
  
  <pre><code>@implementation Fraction   
  {  
        int   numerator;  
        int   denominator;  
  }  
  
      -(void) setNumerator: (int) n   
  {  
      numerator = n;   
  }  
      -(void) setDenominator: (int) d   
  {  
      denominator = d;   
  }
  @end
  </code></pre>
  
  <p>I was wondering why you have to have both "n" and "numerator" for the numerator?  For example why can't you just set </p>
  
  <pre><code>-(void) setNumerator: (int) numerator
  </code></pre>
  
  <p>as apposed to:</p>
  
  <pre><code>-(void) setNumerator: (int) n
       numerator = n;
  }
  </code></pre>
  
  <p>Sorry if this is such a basic question but I'm starting from the beginning with no programming experience.</p>