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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!