示例#1
0
        static void Main(string[] args)
        {
            List <Employee> employees = new List <Employee>()
            {
                new Employee(1, "Геральд Из Ривии", 30, 30),
                new Employee(2, "Губка БоБ Квадратные Штаны", 360, 20),
                new Employee(3, "Эцио Аудиторе Де Ференсе", 0, 40),
                new Employee(4, "Кадзима Гений", 10000, 50),
                new Employee(5, "Пак Мэн", 5, 1),
            };

            foreach (var employee in employees)
            {
                employee.Info();
            }
            Console.WriteLine();
            Chief cheif = new Chief(6, "Солид Снейк", 300, 56, Department.Dev, employees);

            cheif.Info();
            Console.WriteLine();
            Company company = new Company(cheif);

            company.GetAllEmployersInfo();
            Console.WriteLine($"\nEmployers count: {company.GetAllEmployersCount()}\n");
            company.ShowEmployersInfo();
        }
示例#2
0
 public Company(Chief chief)
 {
     Employees = new List <Chief>()
     {
         chief
     };
 }
示例#3
0
 public void AddEmployee(Chief chief)
 {
     Employees.Add(chief);
 }