Q2: Replacement is a very generous institute that provides a Bonus monthly salary to their employees in each month of every second year i.e., a bonus salary for one complete year. The lowest paid employee gets Bonus amount equal to 8% monthly salary of highest paid employee. The second lowest paid gets Bonus equal to 8% monthly salary of second highest paid employee and so on. In each month of second year the Bonus percentage increases with the rate of 2% a month means in next month bonus will be 10% of actual salary of corresponding employee and so on. Following are compulsory in your program. 1. Create a private pointer data member (salary=new double) to the salary of each employee. 2. Create an array of objects for 10 Employees Employee e[10] and assign initial salary using the setter function. 3. Implement a member function "Temporary" to declare and initialize an array of static Special Instances SI[10] of Employee class, to get a copy of e[10] objects using copy constructor. Make sure to apply the knowledge of deep copy here. Return the pointer to pointer array Employee *SI[10]. Use this array of objects to hold updated salary in the required function. 4. Implement a global friend function "Calculate" to compute and update the salary for Bonus month January for the desired employee when it is called the first time. Use the array of object SI[10] for calculating the updated salary. This SI[10] already has a copy of actual salary and now use it along with e[10] for finding the updated salaries of bonus months and store the update salary in SI[10] only. Next call to this same function must repeat the same operation to calculate Bonus salary of February of the desired employee. Calling this function 13th time will repeat the same operation for the month January of the desired employee. Maintain a sequence of function call for any desired employee. You may use static keyword where it is required but it is not compulsory. Call this function by passing both Employee e[10] and Employee *SI[10]. Remember, there is no getter() function to access the private data member salary, therefore a friend function is required. 5. Implement a function to print the salary of required employee for any month including bonus in the sequence of function call. This function can further call the friend function for calculations. 6. Assume two employees cannot have same salaries. 7. Use sorting instead of hard coding the below chart.
Q2: Replacement is a very generous institute that provides a Bonus monthly salary to their employees in each month of every second year i.e., a bonus salary for one complete year. The lowest paid employee gets Bonus amount equal to 8% monthly salary of highest paid employee. The second lowest paid gets Bonus equal to 8% monthly salary of second highest paid employee and so on. In each month of second year the Bonus percentage increases with the rate of 2% a month means in next month bonus will be 10% of actual salary of corresponding employee and so on. Following are compulsory in your program. 1. Create a private pointer data member (salary=new double) to the salary of each employee. 2. Create an array of objects for 10 Employees Employee e[10] and assign initial salary using the setter function. 3. Implement a member function "Temporary" to declare and initialize an array of static Special Instances SI[10] of Employee class, to get a copy of e[10] objects using copy constructor. Make sure to apply the knowledge of deep copy here. Return the pointer to pointer array Employee *SI[10]. Use this array of objects to hold updated salary in the required function. 4. Implement a global friend function "Calculate" to compute and update the salary for Bonus month January for the desired employee when it is called the first time. Use the array of object SI[10] for calculating the updated salary. This SI[10] already has a copy of actual salary and now use it along with e[10] for finding the updated salaries of bonus months and store the update salary in SI[10] only. Next call to this same function must repeat the same operation to calculate Bonus salary of February of the desired employee. Calling this function 13th time will repeat the same operation for the month January of the desired employee. Maintain a sequence of function call for any desired employee. You may use static keyword where it is required but it is not compulsory. Call this function by passing both Employee e[10] and Employee *SI[10]. Remember, there is no getter() function to access the private data member salary, therefore a friend function is required. 5. Implement a function to print the salary of required employee for any month including bonus in the sequence of function call. This function can further call the friend function for calculations. 6. Assume two employees cannot have same salaries. 7. Use sorting instead of hard coding the below chart.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
URGENT HELP PLEASE
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY