//In Objective-C structures do not support inheritance
@protocol PText
- (NSString *) toText;
@end
@interface CPoint : NSObject<PText>
@property int x, y;
@end
@implementation CPoint
- (NSString *) toText {
return [NSString stringWithFormat:@"x = %i; y = %i", self.x, self.y];
}
@end