polymorphism in C++

logistic_guy

Senior Member
Joined
Apr 17, 2024
Messages
1,072
Modify the payroll system of Figs. \(\displaystyle 12.9–12.17\) to include private data member \(\displaystyle \text{birthDate}\) in class \(\displaystyle \text{Employee}\). Use class \(\displaystyle \text{Date}\) from Figs. \(\displaystyle 10.6–10.7\) to represent an employee’s birthday. Assume that payroll is processed once per month. Create a vector of Employee references to store the various employee objects. In a loop, calculate the payroll for each Employee (polymorphically), and add a \(\displaystyle \$ 100.00\) bonus to the person’s payroll amount if the current month is the month in which the Employee’s birthday occurs.
 
Top