Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ What jobs we will need in the future?

Answered: 1 week ago