#ifndef NAME_H
#define NAME_H
#include <iostream.h>
#include "FixedString.h"

class Name {
	friend ostream & operator <<(ostream & oStream, const Name & thisName);
	friend istream & operator >>(istream & iStream, Name & thisName);

public:
	Name();
	Name(const char * first, const char * last);
	Name(const FixedString & first, const FixedString & last);
	void SetFirst(const char * first);
	void SetFirst(const FixedString & first);
	void SetLast(const char * last);
	void SetLast(const FixedString & last);
	FixedString GetFirst() const;
	FixedString GetLast() const;
private:
	FixedString firstName;
	FixedString lastName;
};
#endif

ostream & operator <<(ostream & oStream, const Name & thisName)
{
	oStream << "First Name:" << thisName.firstName << endl;
	oStream << "Last Name:" << thisName.lastName << endl;
	return oStream;
}
istream & operator >>(istream & iStream, Name & thisName)
{
	cout << "First Name:";
	iStream >> thisName.firstName;
	cout << "Last Name:";
	iStream >> thisName.lastName;

	return iStream;
}
Name::Name(const FixedString & first, const FixedString & last) :
	firstName(first), lastName(last)	
	// POST: constructs new Name object with copies of last and first
{
		// all work done in constructor initializer
}