Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //*********************
- // *****Patient.h*****
- //*********************
- #import <UIKit/UIKit.h>
- #import <Foundation/Foundation.h>
- @interface Patient : NSObject
- @property (nonatomic, strong) NSString* fname;
- @property (nonatomic, strong) NSString* mname;
- @property (nonatomic, strong) NSString* lname;
- @property (nonatomic, strong) NSString* age;
- @property (nonatomic, strong) NSString* weight;
- @property (nonatomic, strong) NSString* height;
- @property (nonatomic, strong) NSMutableArray* conditions;
- @property (nonatomic, strong) NSMutableArray* history;
- /*
- -initWithFullName :(NSString*)first middleName:(NSString*) middle lastName:(NSString*) last;
- -initWithFirstLast:(NSString*)first lastName:(NSString*) last;
- -initWithFirst :(NSString*)first;
- -initWithLast :(NSString*)last;
- -init;
- */
- -(NSString*)print;
- @end
- //*********************
- // *****Patient.m*****
- //*********************
- #import "Patient.h"
- @implementation Patient
- @synthesize fname;
- @synthesize mname;
- @synthesize lname;
- @synthesize age;
- @synthesize weight;
- @synthesize height;
- @synthesize conditions;
- @synthesize history;
- /*
- -(Patient*)initWithFullName:(NSString *)first middleName:(NSString*)middle lastName:(NSString *)last
- {
- // self = [super initWithFullName:first middleName:middle lastName:last];
- [self setFname :first ];
- [self setMname :middle];
- [self setLname :last ];
- [self setAge :nil ];
- [self setWeight :nil ];
- [self setHeight :nil ];
- [self setConditions:nil ];
- [self setHistory :nil ];
- return self;
- }
- -(Patient*)initWithFirstLast:(NSString *)first lastName:(NSString *)last
- {
- [super initWithFirstLast:first lastName:last];
- [self setFname :first];
- [self setMname :nil ];
- [self setLname :last ];
- [self setAge :nil ];
- [self setWeight :nil ];
- [self setHeight :nil ];
- [self setConditions:nil ];
- [self setHistory :nil ];
- return self;
- }
- -(Patient*)initWithFirst:(NSString *)first
- {
- [super initWithFirst:first];
- [self setFname :first];
- [self setMname :nil ];
- [self setLname :nil ];
- [self setAge :nil ];
- [self setWeight :nil ];
- [self setHeight :nil ];
- [self setConditions:nil ];
- [self setHistory :nil ];
- return self;
- }
- -(Patient*)initWithLast:(NSString *)last
- {
- [super initWithLast:last];
- [self setFname :nil ];
- [self setMname :nil ];
- [self setLname :last];
- [self setAge :nil ];
- [self setWeight :nil ];
- [self setHeight :nil ];
- [self setConditions:nil ];
- [self setHistory :nil ];
- return self;
- }
- -(Patient*)init
- {
- [super init];
- [self setFname :nil];
- [self setMname :nil];
- [self setLname :nil];
- [self setAge :nil];
- [self setWeight :nil];
- [self setHeight :nil];
- [self setConditions:nil];
- [self setHistory :nil];
- return self;
- }
- -(NSString*)print{
- return [NSString stringWithFormat:@"Name: %@ %@ %@ /n Age: %@ /n Weight: %@ /n Height: %@"], [self fname], [self mname], [self lname], [self age], [self weight], [self height];
- }
- */
- @end
Add Comment
Please, Sign In to add comment