//DISPLAY 15.7 Implementation for the Derived Class SalariedEmployee //This is the file salariedemployee.cpp. //This is the implementation for the class SalariedEmployee. //The interface for the class SalariedEmployee is in //the header file salariedemployee.h. #include #include #include "salariedemployee.h" using namespace std; namespace employeessavitch { SalariedEmployee::SalariedEmployee( ) : Employee( ), salary(0) { //deliberately empty } SalariedEmployee::SalariedEmployee(string theName, string theNumber, double theWeeklySalary) : Employee(theName, theNumber), salary(theWeeklySalary) { //deliberately empty } double SalariedEmployee::getSalary( ) const { return salary; } void SalariedEmployee::setSalary(double newSalary) { salary = newSalary; } void SalariedEmployee::printCheck( ) { setNetPay(salary); cout << "\n__________________________________________________\n"; cout << "Pay to the order of " << getName( ) << endl; cout << "The sum of " << getNetPay( ) << " Dollars\n"; cout << "_________________________________________________\n"; cout << "Check Stub NOT NEGOTIABLE \n"; void SalariedEmployee::printCheck( ) { setNetPay(salary); cout << "\n__________________________________________________\n"; cout << "Pay to the order of " << getName( ) << endl; cout << "The sum of " << getNetPay( ) << " Dollars\n"; cout << "_________________________________________________\n"; cout << "Check Stub NOT NEGOTIABLE \n"; cout << "Employee Number: " << getSSN( ) << endl; cout << "Salaried Employee. Regular Pay: " << salary << endl; cout << "_________________________________________________\n"; } }//employeessavitch