📄 parttimeemployeeimp.cpp
字号:
//Implementation File partTimeEmployee
#include <iostream>
#include <string>
#include "person.h"
#include "pTEmployee.h"
using namespace std;
void partTimeEmployee::print()
{
personType::print();//prints the name of the //employee
cout<<" wages are : "<<calculatePay()<<endl;
}
double partTimeEmployee::calculatePay()
{
return (payRate * hoursWorked);
}
void partTimeEmployee::setNameRateHours(string first,
string last, double rate, double hours)
{
personType::setName(first,last);
payRate = rate;
hoursWorked = hours;
}
partTimeEmployee::partTimeEmployee(string first, string last,
double rate, double hours)
: personType(first, last) //constructor
{
payRate = rate;
hoursWorked = hours;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -