Question: Heres the given code: Heres the problem: Please solve, thanks! // hourlyEmployee class definition class hourlyEmployee : public employee public: // member functions void setData

Heres the given code:

Heres the given code: Heres the problem: Please solve, thanks! // hourlyEmployee

Heres the problem:

class definition class hourlyEmployee : public employee public: // member functions void

Please solve, thanks!

// hourlyEmployee class definition class hourlyEmployee : public employee public: // member functions void setData (string n = "", string d = "", int a0, double p 0, double hrswk0, double payRate0.0) // Data members are set according to the parameters. // Values assigned to numeric data is nonnegative void setHoursWorked (double hrswk); Function to set hours worked // if hrsWk >-0, hoursWorked hrswk // otherwise hoursWorked0; double getHoursWorked ) const; // returns the value of hoursWorked void setHourlyPayRate (double payRate); // Function to set hourly pay rate // If payRate >0, hourlyPayRate = payRate ; // otherwise hourlyPayRate = 0; double getHourlyPayRate const // returns the value of hourlyPayRate void setPay) // Function to set pay // f hoursWorked > 0 and hourlyPayRate > 0 payhoursWorked hourlyPayRate; // Otherwise pay = 0.0; hourlyEmployee (string n- .' " , string d = "", int a- o, double p = 0, double hrswk0, double payRate0.0) // Data members are initialized according to // the parameters. private: // data members double hoursWorked: double hourlyPayRate: I/ end of hourlyEmployee class definition 10. Assume the definition of the classes employee and hourlyEmployee as given in Exercise 9. (2,3,4) a. After identifying and correcting errors in the definition of the class b. Determine whether the function setPay of the class hourlyEmployee c After correcting errors, if any, in the definition of the class hourlyEmployee, give its correct definition. overrides or overloads the function setPay of the class employee. hourlyEmployee, write the definition of the member functions of the class hourlyEmployee

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!