Question: Consider the following class hierarchy: class Employee private : string name; float salary; public: Employee (string n, float s); Employee(); void work(); }; class HR

Consider the following class hierarchy: class Employee private : string name; float salary; public: Employee (string n, float s); Employee(); void work(); }; class HR : public Employee { public: HR (stringn, float s); -HR(); void discipline (HR& person); }; class Finance : public Employee public: Finance (string n, float s); -Finance (); void viewAccounts(); }; class Bookkeeper : public Finance public: Bookkeeper (string n, float s); -Bookkeeper (); void record Transactions(); }; class Accountant : public Finance private : string statements; float budget; public: Accountant (string n, float s, float b); Accountant(); void paySalary(); void work(); }; Rewrite HR's discipline function declaration such that an HR person can discipline any HR or Finance person
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
