Пример #1
0
        static void Main(string[] args)
        {
            // Employee emp = new Employee() { FirstName = "Bob", LastName = "Bobsky", Salary = 600, Role = Role.Other };
            SalesPerson sale = new SalesPerson("Bill", "Billsky", 1500);

            sale.ExtendSuccessSaleRevenue(2000);
            //emp.PrintInfo();
            sale.PrintInfo();
            //Console.WriteLine("Employee Salary: " + emp.GetSalary());
            Console.WriteLine("Sales Person Salary: " + sale.GetSalary());
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Manager manager = new Manager("Bob", "Bobsky");

            manager.PrintInfo();
            manager.AddBonus(3000);
            Console.WriteLine("Salary: {0}", manager.GetSalary());
            Console.WriteLine("------------------------------------");

            SalesPerson sales01 = new SalesPerson("John", "Snow");

            sales01.PrintInfo();
            sales01.ExtendSuccessSaleRevenue(1500);
            Console.WriteLine("Salary: {0}", sales01.GetSalary());


            Console.ReadLine();
        }
Пример #3
0
        static void Main(string[] args)
        {
            Employee emp = new Employee()
            {
                FirstName = "Bob", LastName = "Bobsky", Salary = 600, Role = Role.Other
            };
            SalesPerson sale = new SalesPerson("Bill", "Billsky", 1500);
            Manager     mng  = new Manager("Ron", "Ronsky", 1500);

            sale.ExtendSuccessSaleRevenue(2000);
            mng.AddBonus(400);
            emp.PrintInfo();
            sale.PrintInfo();
            mng.PrintInfo();
            Console.WriteLine("Employee Salary: " + emp.GetSalary());
            Console.WriteLine("Sales Person Salary: " + sale.GetSalary());
            Console.WriteLine("Manager Salary: " + mng.GetSalary());
            Console.ReadLine();
        }