Question: Create a C# Program Similar to Program 4 that illustrate the polymorphism concept. Create a base class and name this class as Employee. It should
Create a C# Program Similar to Program 4 that illustrate the polymorphism concept.
Create a base class and name this class as Employee.
It should have 1 member variable: empName.
1 constructor so that the employee name can be saved for each object.
A method called calcPaidCheck. And it is a virtual method
Create a derived class named HourlyWorker
Create an override method calcPaidCheck. Paid amount = hourly rate x hours worked
Create a derived class name SalaryWorker
Create an override method CalcPaidCheck and the paid amount with be annual-salary/ 12
In the main method, create an array of Employee, and test with 2 worker employees and 2 salary employees
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
