sry, here it is.
Event.h
---------
#ifndef EVENT_H
#define EVENT_H
#include "NameList.h"
#include <iostream>
#include <string>
class Event
{
friend std::istream& operator>>(std::istream& is, Event& target);
friend std:

stream& operator<<(std:

stream& os, const Event& scr);
public:
Event(std::string title_in = "NONE", int year_in = 0,
std::string venue_in = "NONE", int start_in = 0,
int duration_in = 0, NameList partlist_in = NameList());
virtual ~Event();
// This function is NOT virtual (the description is wrong)
// Do NOT change this function's prototype:
std::string classType() const;
virtual Event* duplicate() const;
std::string getKey() const;
std::string getTitle() const;
int getYear() const;
std::string getVenue() const;
int getStartDay() const;
int getDuration() const;
NameList getParticipants() const;
bool operator==(const Event& rhs) const;
bool operator!=(const Event& rhs) const;
bool operator<(const Event& rhs) const;
bool operator>(const Event& rhs) const;
bool operator<=(const Event& rhs) const;
bool operator>=(const Event& rhs) const;
protected:
std::string type;
// moved here - see FAQ
virtual std::istream& readin(std::istream& input);
virtual std:

stream& writeout(std:

stream& output) const;
private:
std::string title;
int year;
std::string venue;
int start_day;
int duration;
NameList participants;
};
#endif
Event.cpp
-------------
#include <iostream>
#include "Event.h"
using namespace std;
//default constructor
Event::Event(string title_in, int year_in,
string venue_in, int start_in,
int duration_in, NameList partlist_in)
{
title = title_in;
year = year_in;
venue = venue_in;
start_day = start_in;
duration = duration_in;
participants = partlist_in;
type = "Event";
}
//Event destructor
Event::~Event()
{
}
//gets title
string Event::getKey() const
{
return title;
}
//returns the title
string Event::getTitle() const
{
return title;
}
//returns year
int Event::getYear() const
{
return year;
}
//returns the venue
string Event::getVenue() const
{
return venue;
}
//returns when the event starts
int Event::getStartDay() const
{
return start_day;
}
//returns duration of event
int Event::getDuration() const
{
return duration;
}
//returns the NameList, or paticipants in the event
NameList Event::getParticipants() const
{
return participants;
}
//overload == operator
bool Event:

perator==(const Event& rhs) const
{
return (title == rhs.title);
}
//overload != operator
bool Event:

perator!=(const Event& rhs) const
{
return (title != rhs.title);
}
//overload < operator
bool Event:

perator<(const Event& rhs) const
{
return (title < rhs.title);
}
//overload > operator
bool Event:

perator>(const Event& rhs) const
{
return (title > rhs.title);
}
//overload <= operator
bool Event:

perator<=(const Event& rhs) const
{
return (title <= rhs.title);
}
//overload >= operator
bool Event:

perator>=(const Event& rhs) const
{
return (title >= rhs.title);
}
//read Event information through input stream
istream& Event::readin(istream& input)
{
input >> title;
input >> year;
input >> venue;
input >> start_day;
input >> duration;
input >> participants;
return input;
}
//outputs Event information in output stream
ostream& Event::writeout(ostream& output) const
{
output <<"EVENT WRITEOUT" << endl;
output << "Title: " << title << ", Year: "<< year << ", Venue: " <<
venue << ", Start Day: " << start_day << ", Duration: "
<< duration << endl;
output << "Participants: " << endl << participants;
return output;
}
//read Event information through input stream
istream& operator>>(std::istream& is, Event& target)
{
target.readin(is);
return is;
}
//outputs Event information in output stream
ostream& operator<<(ostream& os, const Event& scr)
{
scr.writeout(os);
return os;
}
Event* Event:

uplicate() const
{
Event *newEvent;
newEvent = new Event;
*newEvent = *this;
return newEvent;
}
string Event::classType() const
{
return type;
}
TeamEvent.h
---------------
#ifndef TEAMEVENT_H
#define TEAMEVENT_H
#include <iostream>
#include <string>
#include "Event.h"
using namespace std;
class TeamEvent

ublic Event
{
public:
TeamEvent(string title_in = "NONE", int year_in = 0,
string venue_in = "NONE", int start_in = 0,
int duration_in = 0, NameList partlist_in = NameList(),
bool exhibit_in = false, int numTeams_in = 0,
string teams_in[] = NULL);
// NOTE: "teams_in" is an array which would have a COPY of the
// list of initial teams the event should have - the size
// of the array will be at least the value of "numTeams_in"
// The array "teams_in" might NOT be in sorted order.
string classType() const;
TeamEvent* duplicate() const;
bool getExhibition() const;
int getNumTeams() const;
string* getTeams() const;
private:
bool exhibition;
int numTeams;
string *teams;
istream& readin(istream& input);
ostream& writeout(ostream& output) const;
};
#endif
TeamEvent.cpp
------------------
#include <iostream>
#include <string>
#include "TeamEvent.h"
TeamEvent::TeamEvent(string title_in, int year_in,
string venue_in, int start_in,
int duration_in, NameList partlist_in,
bool exhibit_in, int numTeams_in,
string teams_in[]):Event(title_in,year_in, venue_in, start_in,
duration_in, partlist_in)
{
type = "TeamEvent";
exhibition = exhibit_in;
numTeams = numTeams_in;
teams = new string[numTeams];
for (int i =0; i < numTeams; i++)
teams [ i ] = teams_in [ i ];
}
string TeamEvent::classType() const
{
return type;
}
bool TeamEvent::getExhibition() const
{
return exhibition;
}
int TeamEvent::getNumTeams() const
{
return numTeams;
}
string* TeamEvent::getTeams() const
{
return teams;
}
TeamEvent* TeamEvent:

uplicate() const
{
TeamEvent *newEvent;
newEvent = new TeamEvent;
*newEvent = *this;
return newEvent;
}
istream& TeamEvent::readin(istream& input)
{
Event::readin(input);
string exhib;
input >> exhib;
if (exhib == "EXHIBIT")
exhibition = true;
else
exhibition = false;
input >> numTeams;
teams = new string[numTeams];
for (int i =0; i < numTeams; i++)
input >> teams[ i ];
return input;
}
ostream& TeamEvent::writeout(ostream& output) const
{
output <<"TEAMEVENT WRITEOUT" << endl;
Event::writeout(output);
if (exhibition)
output<<"Exhibition: Yes" << endl;
else
output <<"Exhibition: No" << endl;
output <<"Teams:" << endl;
if (numTeams > 0)
for (int i= 0; i < numTeams; i++)
output << teams
<< endl;
else
output <<"none" << endl;
return output;
}
TimedEvent and TeamEvent are also the same and both show the same problem, so i didnt include it
The outputing of TeamEvent and TimedEvent are called in BST.cpp in the print functions
BST.cpp
----------
//this function prints out the elements of the binary search tree in
//lexicographical order
template <class BSTData, class BSTDataKey>
void BST<BSTData, BSTDataKey>:
rintForward(ostream &output,
string option) const
{
output <<"**************** Printing Forward ****************";
printInOrder(root, output, option);
output <<"************** End Printing Forward **************"<<endl;
}
//this function prints out the elements of the binary search tree in
//reverse lexicographical order
template <class BSTData, class BSTDataKey>
void BST<BSTData, BSTDataKey>:
rintBackward(ostream &output,
string option) const
{
output <<"**************** Printing Backward ****************";
printInReverse(root, output, option);
output <<"************** End Printing Backward **************"<<endl;
}
//prints out the elements of the Binary search tree in alphabetical order
template <class BSTData, class BSTDataKey>
void BST<BSTData, BSTDataKey>:
rintInOrder(BSTNode<BSTData> *root,
ostream &output, string option) const
{
if (root->left != NULL)
printInOrder (root->left, output, option);
if (root != NULL && (option == "All" || option==root->data->classType()))
{
output << endl<<root->data->classType();
output << endl<<*root->data;
}
if (root->right != NULL)
printInOrder(root->right, output, option);
}
//prints out the elements of the Binary search tree in reverse alphabetical
//order
template <class BSTData, class BSTDataKey>
void BST<BSTData, BSTDataKey>:
rintInReverse(BSTNode<BSTData> *root,
ostream &output, string option) const
{
if (root->right != NULL)
printInReverse (root->right, output, option);
if (root != NULL && (option == "All"||option == root->data->classType()))
{
output << endl<<root->data->classType();
output << endl <<*(root->data);
}
if (root->left != NULL)
printInReverse(root->left, output, option);
}