예제 #1
0
        static void Main(string[] args)
        {
            Contractor dzoni = new Contractor("Dzoni", "Dzanak", Role.Other, 8, 40);
            Contractor klimce = new Contractor("Ribarot", "Klimce", Role.Other, 6.8, 60);
            Manager vlado = new Manager("Vlado", "Patkata", Role.Manager, 400, 200);
            Manager sale = new Manager("Sale", "Zajakot", Role.Manager, 375.96, 123.123);
            SalesPerson blazo = new SalesPerson("Blazo", "Razbiras", Role.Sales,300.01, 6000);
            List<Employee> Company = new List<Employee>();
            Company.Add(dzoni);
            Company.Add(klimce);
            Company.Add(vlado);
            Company.Add(sale);
            Company.Add(blazo);

            CEO toso = new CEO("Toso", "Malerot", Role.Other, 1545, 200);
            toso.AddSharesPrice(38);
            toso.Employees = Company;
            toso.PrintInfo();
            toso.PrintEmployees();
            Console.WriteLine(toso.GetSalary());


        }
예제 #2
0
        static void Main(string[] args)
        {
            // Company *****************************
            Company company = new Company();


            // CLient *****************************
            Console.WriteLine("**************************************");
            IClient sergio = new Client();

            sergio.Name           = "Sergio";
            sergio.TelephonNumber = 77777777;
            sergio.Email          = "*****@*****.**";
            sergio.PresentYourSelf();


            IPerson roxana = new Client();

            roxana.Name   = "Roxana";
            roxana.Gender = "Female";



            // Employees *****************************
            Console.WriteLine("**************************************");

            ICompanyStaff juan = new Auditor();

            juan.Name   = "Juan";
            juan.Gender = "Male";
            juan.PresentYourSelf();
            juan.ReceiveSalary();

            Employee alex = new Auditor();

            alex.Name   = "Alex";
            alex.Gender = "Male";
            alex.PresentYourSelf();
            juan.ReceiveSalary();
            alex.Work();

            Auditor sandra = new Auditor();

            sandra.Name   = "Sandra";
            sandra.Gender = "Female";
            sandra.ReceiveSalary();
            sandra.PresentYourSelf();


            // Managers *****************************
            Console.WriteLine("**************************************");

            CEO pedro = new CEO();

            pedro.Name   = "Pedro";
            pedro.Gender = "Male";
            pedro.ReceiveSalary();
            pedro.PresentYourSelf();
            pedro.YellAtSomeone();

            DepartmentDirector maria = new DepartmentDirector();

            maria.Name   = "Maria";
            maria.Gender = "Female";
            maria.ReceiveSalary();
            maria.PresentYourSelf();
            maria.CongratulateSomeone();

            ICompanyStaff camila = new DepartmentDirector();

            camila.Name   = "Camila";
            camila.Gender = "Female";
            camila.ReceiveSalary();
            camila.PresentYourSelf();

            Console.WriteLine();
            Console.WriteLine();


            // Add staff to the company *****************************
            company.AddNewMemberToTheStaff(juan);
            company.AddNewMemberToTheStaff(alex);
            company.AddNewMemberToTheStaff(sandra);
            company.AddNewMemberToTheStaff(pedro);
            company.AddNewMemberToTheStaff(maria);
            company.AddNewMemberToTheStaff(camila);
            company.DisplayCompanyStafInformation();


            // Add clients to the company *****************************
            company.AddNewClient(sergio);
            company.AddNewClient(roxana as IClient);
        }