//
//  Student.m
//  Students9
//
//  David J. Malan
//  Harvard University
//  malan@harvard.edu
//
//  Defines a student with (non-init) instance method.
//

#import "Student.h"

@implementation Student

@synthesize age=_age;
@synthesize name=_name;

- (id)init
{
    self = [self initWithName:@"John" andAge:403];
    return self;
}

- (id)initWithName:(NSString *)name andAge:(int)age
{
    if ((self = [super init]))
    {
        self.age = age;
        self.name = name;
    }
    return self;
}

- (void)greet
{
     NSLog(@"Hello, I am %@.  I am %d years old.\n", _name, _age);
}

@end
