home *** CD-ROM | disk | FTP | other *** search
/ Using Visual C++ 4 (Special Edition) / Using_Visual_C_4_Special_Edition_QUE_1996.iso / ch13 / expsum / employee.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-18  |  1.6 KB  |  57 lines

  1. #ifndef EMPLOYEE_H
  2. #define EMPLOYEE_H
  3.  
  4. // Get needed include files
  5. #include <iostream.h>
  6. #include <afx.h>
  7.  
  8. class Employee {
  9. public:
  10.     Employee();
  11.  
  12.     void SetID(unsigned NewID)
  13.         { EmployeeID = NewID; }
  14.     void SetFirstName(const char* NewName)
  15.         { FirstName = NewName; }
  16.     void SetMiddleInitial(char NewInitial)
  17.         { MiddleInitial = NewInitial; }
  18.     void SetLastName(const char* NewName)
  19.         { LastName = NewName; }
  20.     void SetAddress(const char* NewAddress)
  21.         { Address = NewAddress; }
  22.     void SetCity(const char* NewCity)
  23.         { City = NewCity; }
  24.     void SetState(const char* NewState)
  25.         { State = NewState; }
  26.     void SetZip(unsigned long NewZip)
  27.         { Zip = NewZip; }
  28.     void SetNumExpenses(unsigned NewNumExpenses)
  29.         { NumExpenses = NewNumExpenses; }
  30.  
  31.     unsigned      GetID() const { return EmployeeID; }
  32.     CString       GetFirstName() const { return FirstName; }
  33.     char          GetMiddleInitial() const { return MiddleInitial; }
  34.     CString       GetLastName() const { return LastName; }
  35.     CString       GetAddress() const { return Address; }
  36.     CString       GetCity() const { return City; }
  37.     CString       GetState() const { return State; }
  38.     unsigned long GetZip() const { return Zip; }
  39.     unsigned      GetNumExpenses() const { return NumExpenses; }
  40.  
  41. private:
  42.     unsigned      EmployeeID;
  43.     CString       FirstName;
  44.     char          MiddleInitial;
  45.     CString       LastName;
  46.     CString       Address;
  47.     CString       City;
  48.     CString       State;
  49.     unsigned long Zip;
  50.     unsigned      NumExpenses;
  51.  
  52.     friend ostream& operator<<(ostream& ostr, const Employee& employee);
  53.     friend istream& operator>>(istream& istr, Employee& employee);
  54. };
  55.  
  56. #endif
  57.