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

  1. #ifndef EXPENSE_H
  2. #define EXPENSE_H
  3.  
  4. // Get needed include files
  5. #include <iostream.h>
  6. #include <afx.h>
  7.  
  8. class Expense {
  9. public:
  10.     Expense();
  11.  
  12.     void SetDate(const char* NewDate)
  13.         { Date = NewDate; }
  14.     void SetDescription(const char* NewDescription)
  15.         { Description = NewDescription; }
  16.     void SetExpenseAmount(float NewExpenseAmount)
  17.         { ExpenseAmount = NewExpenseAmount; }
  18.  
  19.     CString GetDate() const { return Date; }
  20.     CString GetDescription() const { return Description; }
  21.     float   GetExpenseAmount() const { return ExpenseAmount; }
  22.  
  23. private:
  24.     CString  Date;
  25.     CString  Description;
  26.     float    ExpenseAmount;
  27.  
  28.     friend ostream& operator<<(ostream& ostr, const Expense& employee);
  29.     friend istream& operator>>(istream& istr, Expense& employee);
  30. };
  31.  
  32. #endif
  33.