#import "Greeter.h"

@implementation Greeter

- (void) sayHello {
    NSLog(@"Hello, %@.", greetee);
}


// START:code.objects.initwithname
- (id)initWithName:(NSString *) name  {
    if (self = [super init]) {
        greetee = name;
        return self;
    }
    else return nil;
}
// END:code.objects.initwithname

// START:code.objects.newinit
- (id)init {
    return [self initWithName:@"world"];
}
// END:code.objects.newinit
@end
