//
//  Student.m
//  Students9
//
//  David J. Malan
//  Harvard University
//  malan@harvard.edu
//
//  Defines a student with convenience method.
//

#import "Student.h"

@implementation Student

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

+ (id)studentWithName:(NSString *)name andAge:(int)age
{
    return [[Student alloc] initWithName:name andAge:age];
}

- (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;
}

@end
