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...


URGENT HELP PLEASE


Q2: Replacement is a very generous institute that provides a Bonus monthly salary to their<br>employees in each month of every second year i.e., a bonus salary for one complete year. The<br>lowest paid employee gets Bonus amount equal to 8% monthly salary of highest paid employee. The<br>second lowest paid gets Bonus equal to 8% monthly salary of second highest paid employee and so<br>on. In each month of second year the Bonus percentage increases with the rate of 2% a month<br>means in next month bonus will be 10% of actual salary of corresponding employee and so on.<br>Following are compulsory in your program.<br>1. Create a private pointer data member (salary3Dnew double) to the salary of each employee.<br>2. Create an array of objects for 10 Employees Employee e[10] and assign initial salary using<br>the setter function.<br>3. Implement a member function

Extracted text: 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 (salary3Dnew 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.
Below table provides an easy-to-understand example.<br>Employee Actual<br>Salary<br>Ranking Bonus<br>February Bonus<br>January<br>Salary+Bonus<br>Match<br>Employee<br>5000.2<br>3<br>5000.2 + 560.016<br>700.02<br>1<br>6000.2<br>4<br>6000.2 + 400.032<br>500.04<br>2<br>5000.4<br>4<br>5<br>5000.4 + 480.016<br>..<br>3<br>4000.4<br>1<br>8<br>4000.4 + 800<br>4<br>3000.4<br>3000.4 + 800.016<br>..<br>7000.2<br>3<br>7000.2 + 400.016<br>10000.0<br>8<br>1<br>10000.0 + 320.032<br>7<br>7500.6<br>7<br>2<br>7500.6 + 360.064<br>..<br>4500.8<br>7<br>4500.8 + 600.048<br>10000.2<br>9<br>10000.2 + 240.032<br>..<br>Provide the following functions:<br>Employee(Employee &);<br>• void setter(double);<br>Employee** Temporary(Employee []);<br>friend double Calculate(Employee **, Employee [], int);<br>double print(Employee **, Employee [], int);<br>

Extracted text: Below table provides an easy-to-understand example. Employee Actual Salary Ranking Bonus February Bonus January Salary+Bonus Match Employee 5000.2 3 5000.2 + 560.016 700.02 1 6000.2 4 6000.2 + 400.032 500.04 2 5000.4 4 5 5000.4 + 480.016 .. 3 4000.4 1 8 4000.4 + 800 4 3000.4 3000.4 + 800.016 .. 7000.2 3 7000.2 + 400.016 10000.0 8 1 10000.0 + 320.032 7 7500.6 7 2 7500.6 + 360.064 .. 4500.8 7 4500.8 + 600.048 10000.2 9 10000.2 + 240.032 .. Provide the following functions: Employee(Employee &); • void setter(double); Employee** Temporary(Employee []); friend double Calculate(Employee **, Employee [], int); double print(Employee **, Employee [], int);
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here