Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedC++

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

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago