Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var empManager = new EmployeeManager();

            empManager.AddEmployee(new Employee {
                Name = "Leen", Gender = Gender.Female, Position = Position.Manager
            });
            empManager.AddEmployee(new Employee {
                Name = "Mike", Gender = Gender.Male, Position = Position.Administrator
            });
            empManager.AddEmployee(new Employee {
                Name = "Doha", Gender = Gender.Female, Position = Position.Manager
            });
            empManager.AddEmployee(new Employee {
                Name = "Myada", Gender = Gender.Female, Position = Position.Manager
            });
            var stats = new EmployeeStatistics(empManager);

            Console.WriteLine($"Number of female managers in our company is: {stats.CountFemaleManagers()}");
        }
 public EmployeeStatistics(EmployeeManager empManager)
 {
     _empManager = empManager;
 }