Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

. Object oriented programming with declaration and implementation we want to cre

ID: 666460 • Letter: #

Question

. Object oriented programming with declaration and implementation

we want to create a C++ system that manages the employees of a pharmaceutical company. The company has two types of employees: Researchers and Administrators. Both types of employees have the following properties: employee id (int), name (string), position (string), seniority (int). In addition, researchers have the following attributes: title (string) and area of expertise (string). Administrative employees have the following additional attributes: number of employees that are managed by the employee (int). You can reuse the classes created from assignment 2. It is up to you to decide how many classes are needed. You decide about which functions should be virtual, constant, etc. You need to provide both a class definition and implementation. Each class must have at least the following functions: • A default constructor, a regular constructor, a copy constructor, a destructor • Accessing functions • A print function You can also reuse the class Company created from assignment 2. The class Company has the following attributes: name (string) address (string), list of employees (an array of objects of the Employee class), and number of employees the company has (int). The class must implement the following functions: • A default constructor, a regular constructor, a copy constructor, a destructor • Accessing functions • A function that adds an employee to the company (an exception should be thrown if the employee already exists) • A function that removes an employee from the company (an exception should be thrown if the employee does not exist) • A function that returns the number of employees of the company • A function that returns the list (names) of the employees • A function that prints out the name and address of the company Question [50 marks] Assume that most companies contain the same data and functions as the ones defined as above. Create a class template, called CompanyTemplate, which can be used to generate classes such as the one defined as above. Provide the definition and implementation of the class CompanyTemplate. Have a driver to test your template class.

Explanation / Answer

Researcher.h

researcher.cpp

Employee.h

Employee.cpp

Driver.cpp

Company.h

Company.cpp

Administrator.h

Administrator.cpp