Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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