예제 #1
0
        public static void Main()
        {
            var employee  = new Employee("Name");
            var manager   = new Employee("Manager name");
            var employees = new List <Employee> {
                employee, manager
            };
            var printer = new DetailsPrinter(employees);

            printer.PrintDetails();
        }
예제 #2
0
        public static void Main()
        {
            ICollection <string> docs = new List <string>()
            {
                "report.txt", "overtimehours.txt"
            };
            Manager        manager  = new Manager("Mark", docs);
            Engineer       engineer = new Engineer("Roger", 8);
            DetailsPrinter printer  = new DetailsPrinter(new List <IEmployee>()
            {
                manager, engineer
            });

            printer.PrintDetails();
        }
예제 #3
0
        public static void Main()
        {
            Employee firstEmployee  = new Employee("Pesho");
            Employee secondEmployee = new Employee("Ivan");
            Manager  manager        = new Manager("Gosho", new List <string>()
            {
                "data.txt", "preview.pptx", "salaries.xsl"
            });
            IList <Employee> employees = new List <Employee>()
            {
                firstEmployee, secondEmployee, manager
            };
            DetailsPrinter printer = new DetailsPrinter(employees);

            printer.PrintDetails();
        }
예제 #4
0
        static void Main()
        {
            IWorker firstEmployee  = new Employee("Ivan");
            IWorker secondEmployee = new Employee("Dido");
            IWorker thirdEmployee  = new Employee("Pencho");

            IWorker firstmanager = new Manager("Gosho", new List <string> {
                "Music", "Documents", "Wallpapers"
            });
            IWorker secondmanager = new Manager("Sotir", new List <string> {
                "Recycle bin", "Photos"
            });

            var printer = new DetailsPrinter(new List <IWorker> {
                firstEmployee, secondEmployee, thirdEmployee, firstmanager, secondmanager
            });

            printer.PrintDetails();
        }
예제 #5
0
        public static void Main()
        {
            Employee ivan = new Employee("Ivan");


            List <string> doc = new List <string>
            {
                "Project",
                "Employees",
                "Salarys"
            };
            Manager pesho = new Manager("Pesho", doc);

            List <Employee> emp = new List <Employee>
            {
                ivan,
                pesho
            };

            DetailsPrinter print = new DetailsPrinter(emp);

            print.PrintDetails();
        }