// employee.cpp #include #include #include "employee.h" #include "date.h" // implementazione funzione friend per operator<< ostream& operator<< ( ostream& os, const Employee& e) { os << e.lastName << ", " << e.firstName << "\nAssunto il: "; os << e.hireDate; os << " Nato il: "; os << e.birthDate; os << endl; return os; }; Employee::Employee( string fname, string lname, int bmonth, int bday, int byear, int hmonth, int hday, int hyear ) : birthDate( bmonth, bday, byear ), // lista di inizializzazione hireDate( hmonth, hday, hyear ) // degli oggetti interni { firstName = fname; lastName = lname; cout << "Costruttore di Employee per: " << firstName << ' ' << lastName << endl; } // distruttore: solo per confermare la distruzione Employee::~Employee() { cout << "Distruttore di Employee per: " << lastName << ", " << firstName << endl; }