//
//  crewPerson.m
//  AW139MP
//
//  Created by KulanaMac on 12/23/13.
//
//

#import "crewPerson.h"

@implementation crewPerson

@synthesize name;
@synthesize initial;
@synthesize crewtype;
@synthesize status;
@synthesize weight;
@synthesize EMPnumber;

-(id) initWithName:(NSString*)theName AndInitial:(NSString *)theInitial AndCrewtype:(NSString *)theCrewtype AndStatus:(NSString *)theStatus AndWeight:(NSString *)theWeight AndEMPnumber:(NSString *)theEMPnumber
{
    name=theName;
    initial=theInitial;
    crewtype=theCrewtype;
    status=theStatus;
    weight=theWeight;
    EMPnumber=theEMPnumber;
    
    return self;
}

- (id) initWithCoder: (NSCoder *)coder
{
    if (self = [super init])
    {
        self.name = [coder decodeObjectForKey:@"name"];
        self.initial = [coder decodeObjectForKey:@"initial"];
        self.crewtype = [coder decodeObjectForKey:@"crewtype"];
        self.status = [coder decodeObjectForKey:@"status"];
        self.weight = [coder decodeObjectForKey:@"weight"];
        self.EMPnumber = [coder decodeObjectForKey:@"emp"];
    }
    return self;
}

- (void) encodeWithCoder: (NSCoder *)coder
{
    [coder encodeObject:name forKey:@"name"];
    [coder encodeObject:initial forKey:@"initial"];
    [coder encodeObject:crewtype forKey:@"crewtype"];
    [coder encodeObject:status forKey:@"status"];
    [coder encodeObject:weight forKey:@"weight"];
    [coder encodeObject:EMPnumber forKey:@"emp"];
}


@end
