Do My Homework / Homework Help Answers / Computer Science Homework Help / Payroll system modification add 100 to employee if birthday month

# Payroll system modification add 100 to employee if birthday month

Need help with this question or any other Computer Science assignment help task?

Modify the payroll system to add private data members birthDate and departmentCode to class Employee. Assume that this Payroll is processsed once per month. For each Employee, polymorphically, add a 100 bonus to the person payroll amount if this is the month in which the Employee's bithday occurs. You need to know the present date and the DOB for John, Sue, Bob and Karen (the employees). It happens that Bob and Sue are born in May and will get the bonnus. Write the program to get the DOB and the present date from keyboard.
#ifndef EMPLOYEE_H #define EMPLOYEE_H using namespace std; #include #include #include #include "Date.h" class Employee { public: Employee(const string&, const string&, const string&, int,int,int); virtual ~Employee() = default; void setFirstName(const string&); string getFirstName() const; void setLastName(const string&); string getLastName() const; void setSocialSecurityNumber(const string&); string getSocialSecurityNumber() const; void setBirthDate(int,int,int); Date getBirthDate() const; virtual double earnings() const = 0; virtual void print() const; private: string firstName; string lastName; string socialSecurityNumber; Date birthDate; }; #endif #include #include "Employee.h" using namespace std; Employee::Employee(const string& first, const string& last, const string& ssn, int month, int day,int year) : firstName(first), lastName(last), socialSecurityNumber(ssn), birthDate(month,day,year){} void Employee::setFirstName(const string& first) { firstName = first; } string Employee::getFirstName() const { return firstName; } void Employee::setLastName(const string& last) { lastName = last; } string Employee::getLastName() const { return lastName; } void Employee::setSocialSecurityNumber(const string& ssn) { socialSecurityNumber = ssn; } string Employee::getSocialSecurityNumber() const { return socialSecurityNumber; } void Employee::setBirthDate(int month, int day, int year) { birthDate.setDate(month, day, year); } Date Employee::getBirthDate() const { return birthDate; } void Employee::print() const { cout
There are no answers to this question.