#include <objc/Object.h>

@interface Point : Object
{
  unsigned x, y;
}

+ X: (unsigned)__x Y: (unsigned)__y;
+ new;
- SetX: (unsigned)__x;
- SetY: (unsigned)__y;
- (unsigned)GetX;
- (unsigned)GetY;
- (unsigned long)Arie;

@end

@implementation Point : Object
{
  unsigned x, y;
}

+ X: (unsigned)__x Y: (unsigned)__y
{
  self = [super new];
  [self SetX:__x];
  [self SetY:__y];
  return self;
}

+ new {
  self = [super new];
  [self SetX:0];
  [self SetY:0];
}

- SetX: (unsigned)__x
{
  x = __x;
  return self;
}

- SetY: (unsigned)__y
{
  y = __y;
  return self;
}

- (unsigned)GetX
{
  return x;
}

- (unsigned)GetY
{
  return y;
}

- (unsigned long)Arie
{
  return x * y;
}

@end

main()
{
  id p;

  p = [Point X:5 Y:10];
  printf("Aria = %d\n", [p Arie]);
}
