Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("**** Yhe employee class hierarchy ****");
            SalesPerson fred = new SalesPerson();

            fred.EmpName     = "Fred";
            fred.EmpAge      = 32;
            fred.SalesNumber = 210;
            fred.CurrPay     = 100;
            fred.GiveBonus(1000);
            fred.DisplayStatus();
            Console.WriteLine();

            Manager chuky = new Manager("Chuky", 42, 10010, 30000, 52);

            Console.WriteLine("Benefit: {0}", chuky.GetBenefitCost().ToString());
            chuky.GiveBonus(300);
            chuky.DisplayStatus();
            Console.WriteLine();

            Console.ReadLine();
        }