//
//  Student.m
//  Students5
//
//  David J. Malan
//  Harvard University
//  malan@harvard.edu
//
//  Defines a student with (mostly) synthesized properties.
//

#import "Student.h"

@implementation Student

@synthesize age=_age;
@synthesize name=_name;
         
- (void)setName:(NSString *)name
{
    if ([name isEqualToString:@"David"]) {
        _name = [[NSString alloc] initWithString:@"Dummy"];
    }
    else {
        _name = [name copy];
    }
}

@end
