?? parttimeemployeeimp.cpp
字號:
#include <iostream>
#include <string>
#include "partTimeEmployee.h"
using namespace std;
void partTimeEmployee::print() const
{
personType::print(); //print the name of the employee
cout << "'s wages are: $" << calculatePay() << endl;
}
double partTimeEmployee::calculatePay() const
{
return (payRate * hoursWorked);
}
void partTimeEmployee::setNameRateHours(string first,
string last, double rate, double hours)
{
personType::setName(first, last);
payRate = rate;
hoursWorked = hours;
}
//Constructor
partTimeEmployee::partTimeEmployee(string first, string last,
double rate, double hours)
: personType(first, last)
{
payRate = rate;
hoursWorked = hours;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -