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

📄 parttimeemployee.h

📁 C++编成数据结构与程序设计方法 D.S.Malk编著
💻 H
字号:
#ifndef H_partTimeEmployee
#define H_partTimeEmployee

#include "personType.h"

class partTimeEmployee: public personType
{
public:
    void print() const;
      //Function to output the first name, last name, and 
      //the wages.
      //Postcondition: Outputs 
      //        firstName lastName wages are $$$$.$$

    double calculatePay() const; 
      //Function to calculate and return the wages.
      //Postcondition: Pay is calculated and returned

    void setNameRateHours(string first, string last,
                          double rate, double hours);
      //Function to set the first name, last name, payRate,
      //and hoursWorked according to the parameters.
      //Postcondition: firstName = first; lastName = last;
      //               payRate = rate; hoursWorked = hours

    partTimeEmployee(string first = "", string last = "", 
                     double rate = 0, double hours = 0);
      //Constructor with parameters
      //Sets the first name, last name, payRate, and hoursWorked
      //according to the parameters. If no value is specified, 
      //the default values are assumed.
      //Postcondition: firstName = first; lastName = last; 
      //               payRate = rate; hoursWorked = hours

private:
    double payRate;     //variable to store the pay rate
    double hoursWorked; //variable to store the hours worked
}; 

#endif

⌨️ 快捷键说明

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