// // Circle.m // shape6 // Definition of class Circle // #import "Circle.h" @implementation Circle -(id) init: (int)xin y: (int)yin rad: (int)radin { if (self = [super init]) { x = xin; y = yin; rad = radin; } return self; } -(void) setPos: (int)xin y: (int)yin { x = xin; y = yin; } -(void) setSize: (int)radin { rad = radin; } -(void) draw { printf ("Drawing circle at %d, %d, radius = %d\n", x, y, rad); } -(float) area { return (float) (rad * rad * 3.14159); } @end