title: Use of undeclared identifier: Area and Perimeter of a Rectangle
body: <p>i am new to Objective-C, not entirely sure where I am going wrong here.
  I am trying to get the program to print the area and perimeter of a square.
  The program is telling me that I am sending an undeclared identifier to the perimeter and area methods</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface Rectangle : NSObject
  {
  int width;
  int height;
  }
  
  -(void) setWidth: (int) w;
  -(void) setHeight: (int) h;
  -(int) width;
  -(int) height;
  -(int) area;
  -(int) perimeter;
  
  @end
  
  @implementation Rectangle
  
  
  -(void) setWidth:(int)w   
  {
  width = w;
  }
  
  -(void) setHeight: (int)h
  {
  height = h;
  }
  
  -(int) width
  {
  return width;
  }
  
  -(int) height
  {
  return height;
  }
  
  -(int) area
  {
  return width*height;
  }
  
  -(int) perimeter
  {
  return (2*width + 2*height);
  }
  
  
  @end
  int main(int argc, const char * argv[])
  {
  
  @autoreleasepool {
  
      Rectangle *rect1 = [[Rectangle alloc] init];
  
      [rect1 setWidth:2];
      [rect1 setHeight:7];
  
      NSLog(@"The perimeter of rect1 is: %i and the area is: %i", area, area);
  
  
  }
  return 0;
  }
  </code></pre>