⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 salaried.h

📁 斯坦福Energy211/CME211课《c++编程——地球科学科学家和工程师》的课件
💻 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 + -