#include "Owner.h" #include "Date.h" using namespace std; namespace CS1124 { //constructor intializes the owners name, the birthdate from the date class //as well as setting the owner to have no initial pet Owner::Owner(std::string ownerName, std::string date): ownerName(ownerName), date(date), pet(NULL) {} //output the owners and pets names void Owner::displayDate() { date.display(); } ostream& operator << (ostream & os,const Owner& owner) { //display the owner os<< "Owner: " << owner.getName() << " DOB: " <<" " << owner.displayDate(); os << " My Pet: "; //Check if he has a pet if(owner.getPet())//display that pet os<getName(); else //if not say he doesnt os<<"I don't have a pet."; return os; } }