Question: class Employeef private: string firstName; string lastName; int hourWorked; double Pay Rate; double Salary; public: //1. write separate default and explicit constructors. The memory allocation

 class Employeef private: string firstName; string lastName; int hourWorked; double Pay
Rate; double Salary; public: //1. write separate default and explicit constructors. The

class Employeef private: string firstName; string lastName; int hourWorked; double Pay Rate; double Salary; public: //1. write separate default and explicit constructors. The memory allocation for //pointer lastName is done inside the constructor. //2. Write a copy constructor that makes deep copy. //3. Write an assignment operator that makes deep copy and deletes the memory //allocated to the pointer which is being given a new pointee. //4. Write a virtual destructor that de-allocates the memory allocated by //constructors

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!