Question
c++ Consider now the class SalariedEmployee. Fully implement the class Salaried Employee. For this, you are expected to write the code for the constructors, getter
c++ Consider now the class SalariedEmployee. Fully implement the class Salaried Employee. For this, you are expected to write the code for the constructors, getter and setter functions, and the virtual functions display() and determineEarnings().
class SalariedEmployee: public Employee { public:
// constructors SalariedEmployee (); SalariedEmployee(int emplID, string fn, string ln, double salary); // get function member double getSalary() const; // set function member // initializes the employee salary if salary is positive and 0.0 otherwise void setSalary(double salary); // display salaried employee details to standard output virtual void display() const; // computes and returns monthly earnings of the employee virtual determineEarnings() ; // destructor virtual ~Employee() {}
private:
double _annualSalary; };
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started