📄 salaried.h
字号:
// Header file for the Salaried class, derived from the// Employee base class and used to maintain records for // employees with a fixed monthly salary#ifndef CLASS_Salaried#define CLASS_Salaried#include "employee.h" // Always include header from // base classclass Salaried : public Employee {public: // Constructor Salaried( const std::string& name, const std::string& ssn, double salary ); // Copy constructor Salaried( const Salaried& s ); // Destructor ~Salaried(); // Get/Set pairs to work with member variables inline double GetSalary() const { return m_Salary; } inline void SetSalary( double s ) { m_Salary = s; } // Computes and returns yearly pay from monthly salary double GetYearlyPay() const; // Called by << operator to output member variables // specific to salaried employees void SendTo( std::ostream& out ) const; private: double m_Salary; // monthly salary // This is declared private to prevent assignment Salaried& operator=( const Salaried& s ); };#endif // CLASS_Salaried
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -