APLOC2/Week1/APLOC2 Week 1/APLOC2 Week 1/ChildFactory.m
Brent Marohnic 8d1db02fb8 Final Commit
2013-02-07 23:46:04 -05:00

33 lines
614 B
Objective-C

//
// ChildFactory.m
// APLOC2 Week 1
//
// Created by Brent Marohnic on 2/7/13.
// Copyright (c) 2013 Brent Marohnic. All rights reserved.
//
#import "ChildFactory.h"
#import "Child.h"
@implementation ChildFactory
-(Child*)GetChild:(int)childType
{
if (childType == 0)
{
return [[Child alloc] initWithDetails:0 inpStrName:@"Jack"];
}
else if (childType == 1)
{
return [[Child alloc] initWithDetails:1 inpStrName:@"Connor"];
}
else if (childType == 3)
{
return [[Child alloc] initWithDetails:3 inpStrName:@"Brent"];
}
return nil;
}
@end