예제 #1
0
        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);
        }
예제 #2
0
        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();
        }