Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ object oriented using visual studio Task (Static, Composition, inheritance, and Polymorphism) Part 1 In a university system, employees can be categorised into: academics and

image text in transcribedimage text in transcribedimage text in transcribed

C++ object oriented using visual studio

Task (Static, Composition, inheritance, and Polymorphism) Part 1 In a university system, employees can be categorised into: academics and administrators. However, all employees share common attributes: ID, Name, Hire Date, and salary. The Academics can have the additional attributes: Teaching load (hours), teaching allowance. The administrators have the additional attributes: job title, admin_allowance Note: name and job title are of type string, ID is const int, it is given a serial number starting from 200001, 200002, 200003, and so on. Salary, admin_allowance, Teaching load and teaching allowance of type double. Hire Date is of type Date (you have to write simple class Date) Declare all data attributes as private Given below the classes declarations Separate class interface and implementation 1) Create the base class Employee with the following functionalities: a) A constructor to initialize the data members and a virtual destructor b) A set function named set_values to change the Name, Hire_Date, and salary c) A function named print to display the details of Employee d) A virtual function named calaculate salary (this returns the salary) e) A pure virtual function void set _values( const string, double) to act as an interface to access set values in class Administrator, in case of Polymorphism Create derived class Administrator with the following functionalities: a) A constructor to initialize the data members and a destructor b) A set function to change the job_title and admin_allowance c) A function named print to display all details including the one from the base class d) A function named calaculate salary (this returns admin_allowance+salary). Hint: call calaculate salary0) 2) function in base class to get salary 3) Similarly create class Academic i nclude includecstring> using namespace std; class Datel private: int day,month, yeari public: Date (int-1,int-1,int-1935) -Date) void print ()const; Task (Static, Composition, inheritance, and Polymorphism) Part 1 In a university system, employees can be categorised into: academics and administrators. However, all employees share common attributes: ID, Name, Hire Date, and salary. The Academics can have the additional attributes: Teaching load (hours), teaching allowance. The administrators have the additional attributes: job title, admin_allowance Note: name and job title are of type string, ID is const int, it is given a serial number starting from 200001, 200002, 200003, and so on. Salary, admin_allowance, Teaching load and teaching allowance of type double. Hire Date is of type Date (you have to write simple class Date) Declare all data attributes as private Given below the classes declarations Separate class interface and implementation 1) Create the base class Employee with the following functionalities: a) A constructor to initialize the data members and a virtual destructor b) A set function named set_values to change the Name, Hire_Date, and salary c) A function named print to display the details of Employee d) A virtual function named calaculate salary (this returns the salary) e) A pure virtual function void set _values( const string, double) to act as an interface to access set values in class Administrator, in case of Polymorphism Create derived class Administrator with the following functionalities: a) A constructor to initialize the data members and a destructor b) A set function to change the job_title and admin_allowance c) A function named print to display all details including the one from the base class d) A function named calaculate salary (this returns admin_allowance+salary). Hint: call calaculate salary0) 2) function in base class to get salary 3) Similarly create class Academic i nclude includecstring> using namespace std; class Datel private: int day,month, yeari public: Date (int-1,int-1,int-1935) -Date) void print ()const

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

WHAT IS AUTOMATION TESTING?

Answered: 1 week ago

Question

What is Selenium? What are the advantages of Selenium?

Answered: 1 week ago

Question

Explain the various collection policies in receivables management.

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago