Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 mor Employee(int i, float s, string n, string d); string GetDepartment(); void SetID(int id) ; void Set Salary(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 GetSalary Rating function such that it returns "Very High" for Salary >=1000, High for (750 to =2000, High for [1500 to
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