private static void Main(string[] args) { const int hours = 50, wage = 70; Employee person = new Employee(); person.CalculateWeeklySalary(hours, wage); Contractor contractor = new Contractor(); contractor.CalculateWeeklySalary(hours, wage); }
static void Main(string[] args) { const int hours = 50, wage = 70; Employee emp = new Employee(); emp.CalculateWeeklySalary(hours, wage); // Polymorphism Contractor cont = new Contractor(); cont.CalculateWeeklySalary(hours, wage); // Polymorphism Console.WriteLine("Press any key to continue .........."); Console.ReadKey(); }