/* * Employee.cpp * implementation of Employee class * CIS 250 * David Klick * 1/24/05 * */ #include "Employee.h" void Employee::print() { using std::cout; using std::endl; using std::setw; using std::setfill; using std::showpoint; using std::setprecision; using std::setiosflags; using std::ios; using std::fixed; cout << setw(15) << lastname << " ID=" << setfill('0') << setiosflags(ios::fixed | ios::scientific) << setprecision(6) << setw(6) << id << setfill(' ') << " rate=$" << setw(6) << fixed << showpoint << setprecision(2) << rate << " hired=" << setw(2) << setfill('0') << hiredate.month << "/" << setw(2) << hiredate.day << '/' << setw(2) << (hiredate.year % 100) << setfill(' ') << endl; } void Employee::setfields(char* nm, unsigned long id, double hrate, int m, int d, int y) { strcpy(lastname, nm); this->id = id; rate = hrate; hiredate.month = m; hiredate.day = d; hiredate.year = y; }