/*
 * You may freely copy, distribute, and reuse the code in this example.
 * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
 * fitness for any particular use.
 * David A. Cheslow disclaims any warranty of any kind, expressed or  implied, as to its
 * fitness for any particular use.
 */


#import "ComplexObject.h"
#import <objc/hashtable.h>
#import <libc.h>

@implementation ComplexObject

  
- free
{
	/* Make sure the string buffers allocated gets freed */
  free(lastName);
  free(firstName);
  free(middleInit);
  return [super free];
}


- (char *)lastName
{
	return lastName;
}

- (char *)firstName
{
	return firstName;
}


- (char *)middleInit
{
	return middleInit;
}


- setLastName:(char *)newLastName
{
	lastName = realloc(lastName,strlen(newLastName)+1);
	strcpy(lastName,newLastName);
	return self;
}
	 
- setFirstName:(char *)newFirstName
{
	firstName = realloc(firstName,strlen(newFirstName)+1);
	strcpy(firstName, newFirstName);
	return self;
}
	 
- setMiddleInit:(char *)newMiddleInit
{
	middleInit = realloc(middleInit,strlen(newMiddleInit)+1);
	strcpy(middleInit, newMiddleInit);
	return self;
}
	 
- (char *)note
{
	return note;
}

- setNote:(char *)newNote
{
	note = realloc(note,strlen(newNote)+1);
	strcpy(note, newNote);
	return self;
}
	 
- (int)radioButtonSelected
{
	return radioButtonSelected;
}

- setRadioButtonSelected:(int)newSelection
{
	radioButtonSelected = newSelection;
	return self;
}
@end
