polymorphism in C++

logistic_guy

Senior Member
Joined
Apr 17, 2024
Messages
1,370
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.
 
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.
Please show us what you have tried and exactly where you are stuck.

Please follow the rules of posting in this forum, as enunciated at:


Please share your work/thoughts about this problem
 
I respect you khan, but I doubt it you understand polymorphism!

😜
My understanding is NOT required here. What is required is every student that asks question here IS required to explain - "where they are stuck".
Nobody touched this problem for 15 days - because you failed to provide a point "to start".

I am an Engineer - I do not understand polymorphism - I did not ever use it in any shape or form. However, my wife is a computer scientist with Degrees from University. So I had a walking reference - other than using AI.
 
My understanding is NOT required here. What is required is every student that asks question here IS required to explain - "where they are stuck".
Nobody touched this problem for 15 days - because you failed to provide a point "to start".

I am an Engineer - I do not understand polymorphism - I did not ever use it in any shape or form. However, my wife is a computer scientist with Degrees from University. So I had a walking reference - other than using AI.
I knew that you don't understand polymorphism and I also know that no one in this site understands polymorphism. I understand polymorphism, so it's either @Ted promotes me to a moderator, or this site will lack the ability to help all types of students.

I will dedicate some of my time to help students understand how to solve problems involving polymorphism. I will teach them the art of polymorphism.

Professor khan, you were so lucky when you entered this thread because soon you will understand some of the ideas behind polymorphism. Just make sure that you come back to this thread from time to time!

💪🥸
 
you will understand some of the ideas behind polymorphism
My cup runneth over - I do not need to understand polymorphism in CS. Like I said - I am surrounded by experts in CS.

Now polymorphism in material (crystals) - there lies my expertise......
 
Top