Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve with c++ QUESTION 1: Each employee at hospitals has an id, a name, a salary, and a department. An employee can be a nurse
solve with c++
QUESTION 1: Each employee at hospitals has an id, a name, a salary, and a department. An employee can be a nurse employee or a doctor employee. Given the following employee class: class Employee { public: Employee(); // sets all info to or Employee(int i, float s, string n, string d) ; string GetDepartment(); void SetID(int id) ; void SetSalary(float salary); void setName(string name) ; void SetDepartment(string department); virtual string GetSalaryRating() = 0; virtual bool IsNurse() = 0; virtual void Print(); // print all information protected: float GetSalary() { return salary; } private: int id; float salary; string name; string department; }; QUESTION 2: Define a new class called Nurse. This class should 1. Inherit (derive) from Employee class and include one new string member variables (shift_schedule). 2. Define a constructor to initialize all member variables (id, salary, name, department, shift_schedule) 3. Override GetSalaryRating function such that it returns Very High for Salary >=1000, High for [750 to =2000, High for [1500 toStep 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