Question: Sample Interactive Session In the sample data that follows, what the user types is shown in bold. In actuality, what the user types would appear
Sample Interactive Session
In the sample data that follows, what the user types is shown in bold. In actuality, what the user types would
appear as the same text format as the rest of the output.
Employee.cpp
Implementation file for the Employee class
#include "Employee.h
#include
using namespace std;
int Employee::lastEmployeeNumberIssued; Sequential employee number
Default constructor
Employee::Employee
lastEmployeeNumberIssued;
employeeNumber lastEmployeeNumberIssued;
employeeName ;
hireDate ;
Constructor
Employee::Employeestring aName, string aDate
lastEmployeeNumberIssued;
employeeNumber lastEmployeeNumberIssued;
employeeName aName;
hireDate aDate;
Mutators
void Employee::setEmployeeNamestring n
employeeName n;
void Employee::setHireDatestring date
hireDate date;
Accessors
string Employee::getEmployeeName const
return employeeName;
int Employee::getEmployeeNumber const
return employeeNumber;
string Employee::getHireDate const
return hireDate;
int Employee::getLastEmployeeNumberIssued
return lastEmployeeNumberIssued;
Employee.h
Specification file for the Employee class
#ifndef EMPLOYEEH
#define EMPLOYEEH
#include
using namespace std;
class Employee
private:
static int lastEmployeeNumberIssued; Sequential employee number
int employeeNumber; Employee number for current employee
string employeeName; Employee name
string hireDate; Hire date
public:
Constructors
Employee;
Employeestring aName, string aDate;
Mutators
void setEmployeeNamestring n;
void setHireDatestring date;
Accessors
string getEmployeeName const;
int getEmployeeNumber const;
string getHireDate const;
static int getLastEmployeeNumberIssued;
;
#endif
ProductionWorker.h
Specification file for the ProductionWorker Class
#ifndef PRODUCTIONWORKERH
#define PRODUCTIONWORKERH
#include
#include
#include
#include "Employee.h
using namespace std;
class ProductionWorker : public Employee
private:
int shift; The worker's shift
double payRate; The worker's hourly pay rate
public:
Default constructor
ProductionWorker : Employee
shift ; payRate ;
Constructor
ProductionWorkerstring aName, string aDate, int aShift, double aPayRate
: EmployeeaName aDate
shift aShift; payRate aPayRate;
Mutators
void setShiftint s;
void setPayRatedouble r;
static ProductionWorker createNewProductionWorker;
Accessors
int getShiftNumber const;
string getShiftName const;
double getPayRate const;
void printWorkerData const;
;
#endif
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
