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

📄 prg13_1.cpp

📁 这是数据结构和算法的国外经典书籍.清华大学出版社出版的<数据结构C++语言描述-应用模板库STL>陈君 译 英文名称是Data Structures with C++ Using STL.
💻 CPP
字号:
// File: prg13_1.cpp
// after declaring an hourly employee, Steve Howard, call
// displayEmployeeInfo() to output his data. change the employee's
// hourly pay to $10 using setHourlyPay() and call payrollCheck()
// to pay the worker using the new rate

#include <iostream>

#include "d_emp.h"

using namespace std;

int main()
{
	// declare an hourly employee
	hourlyEmployee hEmp("Steve Howard","896-54-3217",7.50,40);

	// output only the base class information on Steve Howard
	hEmp.employee::displayEmployeeInfo();
	cout << endl;

	// give Steve Howard a raise and output full set of information
	hEmp.setHourlyPay(10.00);
	hEmp.displayEmployeeInfo();
	cout << endl;

	// provide a weekly check
	hEmp.payrollCheck();
	cout << endl;

	return 0;
}

/*
Run:

Name: Steve Howard
Social Security Number:  896-54-3217

Name: Steve Howard
Social Security Number:  896-54-3217
Status:   hourly employee
Payrate:  $10.00 per hour
Work schedule (hours per week) 40.00

Pay Steve Howard (896-54-3217)  $400.00
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -