Beispiel #1
0
        static void Main(string[] args)
        {
            Employee    employee    = new Employee("Bob", "Bobsky", Role.Others, 600);
            SalesPerson salesPerson = new SalesPerson("Bill", "Bilsky", 1500);
            Manager     manager     = new Manager("Elon", "Musk", 5000);

            salesPerson.ExtendSuccessRevenue(2000);
            manager.AddBonus(4000);
            salesPerson.ExtendSuccessRevenue(3000);

            Console.WriteLine(employee.GetInfo());
            Console.WriteLine(salesPerson.GetInfo());
            Console.WriteLine(manager.GetInfo());

            Console.WriteLine($"Employee salary: {employee.GetSalary()}");
            Console.WriteLine($"Sales person salary: {salesPerson.GetSalary()}");
            Console.WriteLine($"Manager salary: {manager.GetSalary()}");


            Contractor contractor = new Contractor("Greg", "Gregsky", 40, 50, manager);

            Console.WriteLine($"Contractor current manager: {contractor.CurrentManager()}");
            Console.WriteLine($"Manager salary: {contractor.GetSalary()}");



            Employee[] company = new Employee[5]
            {
                new Contractor("Bill", "Bilsky", 38, 55, manager),
                new Contractor("Mallory", "Monroe", 44, 60, manager),
                new Manager("Scot", "Scotsky", 1000),
                new Manager("Ben", "Bensky", 2000),
                new SalesPerson("Jill", "Jillsky", 1500)
            };

            CEO ceo = new CEO("Ron", "Ronsky", 1500, company);

            Console.WriteLine($"\n\nCEO: {ceo.GetInfo()}");
            Console.WriteLine("Employees: ");
            foreach (string employee1 in ceo.GetEmployees())
            {
                Console.WriteLine(employee1);
            }

            Console.WriteLine(ceo.GetSalary());

            ceo.SetShares(30);
            ceo.AddSharesPrice(500);

            Console.WriteLine($"CEO sallary with shares: {ceo.GetSalary()}");
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Manager john = new Manager("John", "Brown");
            Manager bryn = new Manager("Bryn", "Ward");

            john.AddBonus(600);
            Console.WriteLine(john.GetSalary());
            Console.WriteLine("-----------------");
            SalesPerson mike = new SalesPerson("Mike", "Smith");

            mike.ExtendSuccessRevenue(1300);
            Console.WriteLine(mike.GetSalary());
            Console.WriteLine("-----------------");
            Contractor tim   = new Contractor("Tim", "Jones", 160, 2.5, john);
            Contractor brook = new Contractor("Brook", "Hanks", 160, 2.5, john);

            Console.WriteLine(tim.GetSalary());
            Console.WriteLine("-----------------");
            Employee[] company =
            {
                brook, tim, bryn, john, mike
            };
            CEO luke = new CEO("Luke", "Redd", company);

            luke.AddSharesPrice(5);
            Console.WriteLine($"{luke.Role}:");
            luke.PrintInfo();
            Console.WriteLine($"Salary of {luke.Role} is {luke.GetSalary()}");
            luke.PrintEmployees();
            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Manager    bob  = new Manager("Bob", "Bobert", "Development department", 1200);
            Manager    rick = new Manager("Rick", "Rickert", "HR department", 1300);
            Contratcor mona = new Contratcor("Mona", "Monalisa", 20.5, 70, bob);
            Contratcor igor = new Contratcor("Igor", "Igorsky", 12.2, 80, rick);
            Sales      lea  = new Sales("Lea", "Leova");

            lea.AddSuccessRevenue(1800);

            Employee[] employees = new Employee[] { bob, rick, mona, igor, lea };

            Console.WriteLine($"{mona.GetInfo()} - salary: {mona.Salary}$ - department: {mona.CurrentPossition()}");

            Console.WriteLine("----------------");

            CEO ceo = new CEO("Ron", "Ronsky", employees, 1500, 140);

            ceo.AddSharesPrice(10);
            Console.WriteLine($"{ceo.GetInfo()} - salary: {ceo.Salary}");
            Console.WriteLine($"Salary of CEO is: {ceo.GetSalary()}");
            Console.WriteLine("Employees:");
            ceo.PrintEmployees();
            Console.ReadLine();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Contractor constractor1 = new Contractor()
            {
                FirstName = "Bob", LastName = "Bobert", Role = Role.Other
            };
            Contractor constractor2 = new Contractor()
            {
                FirstName = "Rick", LastName = "Rickert", Role = Role.Other
            };
            Manager     manager1   = new Manager("Mona", "Monalisa");
            Manager     manager2   = new Manager("Igor", "Igorsky");
            SalesPerson salePeson1 = new SalesPerson("Lea", "Leova");

            Employee[] Company = { constractor1, constractor2, manager1, manager2, salePeson1 };
            CEO        ceo1    = new CEO()
            {
                FirstName = "Ron", LastName = "Ronsky", Role = Role.Other, Shares = 300
            };

            ceo1.SetSalary(1500);
            ceo1.Employees = Company;
            Console.WriteLine("CEO: ");
            ceo1.PrintInfo();
            ceo1.AddSharesPrice(200);
            Console.WriteLine($"Salary of CEO  is: {ceo1.GetSalary()}");
            ceo1.PrintEmployees();
            //CurrentPosition
            //manager1.Dedepartment = "department1";
            //constractor1.Responsible = manager1;
            //constractor1.CurrentPosition();
            Console.ReadLine();
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Employee emp = new Employee()
            {
                FirstName = "Marko", LastName = "Naumov", Role = Role.Other
            };
            SalesPerson sp   = new SalesPerson("Bojan", "Sazdovski");
            Manager     mg   = new Manager("Damjan", "Temelko", 500);
            Employee    emp2 = new Employee()
            {
                FirstName = "Petko", LastName = "petkovski", Role = Role.Other
            };
            Employee emp3 = new Employee()
            {
                FirstName = "Stanko", LastName = "stankovski", Role = Role.Other
            };
            Contractor cont  = new Contractor("Ivan", "Ivanovski");
            Contractor cont2 = new Contractor("Stojan", "Stojanovski");
            Manager    mg2   = new Manager("Elena", "Stojanovska", 400);

            Employee[] company = { sp, mg, mg2, cont, cont2 };

            CEO ceo = new CEO("Steve", "Jobs", 500, company, 120);

            ceo.AddSharePrice(200);


            ceo.GetInfo();
            Console.WriteLine($"The salary of CEO is {ceo.GetSalary()}");
            ceo.PrintEmployees();
            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Employee    employee      = new Employee("Bob", "Bobsky", Role.Other, 600);
            SalesPerson salesPerson   = new SalesPerson("Bill", "Billsky", 1500);
            Manager     manager       = new Manager("Elon", "Musk", 5000);
            Manager     managerTwo    = new Manager("Bil", "Gates", 5000);
            Contractor  contractor    = new Contractor("Steve", "Stevensky", 160, 15, manager);
            Contractor  contractorTwo = new Contractor("John", "Johnsky", 160, 30, manager);

            Employee[] company = { contractor, contractorTwo, manager, managerTwo, salesPerson };

            CEO RonCEO = new CEO("Ron", "Ronsky", company, 70, 20);

            RonCEO.PrintInfo();
            Console.WriteLine($"Salary of CEO is: {RonCEO.GetSalary()}");
            RonCEO.PrintEmployees();



            salesPerson.ExtendSuccessRevenue(2000);
            manager.AddBonus(4000);
            salesPerson.ExtendSuccessRevenue(3000);

            Console.WriteLine(employee.GetInfo());
            Console.WriteLine(salesPerson.GetInfo());
            Console.WriteLine(manager.GetInfo());


            Console.WriteLine($" \n Employee salary: {employee.GetSalary()}");
            Console.WriteLine($"SalesPerson salary: {salesPerson.GetSalary()}");
            Console.WriteLine($"Manager salary: {manager.GetSalary()}");
        }
Beispiel #7
0
        public static void Test()
        {
            Employee manager = new Manager();

            manager.GetSalary();
            Employee ceo = new CEO();

            ceo.GetSalary();
        }
        static void Main(string[] args)
        {
            Manager     firstManager     = new Manager("Lea", "Leova", 1200);
            Manager     secondManager    = new Manager("John", "Johnsky", 1100);
            SalesPerson salesPerson      = new SalesPerson("Mona", "Monalisa");
            Contractor  firstContractor  = new Contractor("Bob ", "Bobert", 6.5, 450, firstManager);
            Contractor  secondContractor = new Contractor("Rick ", "Rickert", 5.5, 400, secondManager);

            firstContractor.GetSalary();
            secondContractor.GetSalary();

            firstManager.AddBonus();
            firstManager.GetSalary();

            secondManager.AddBonus();
            secondManager.GetSalary();

            salesPerson.AddSuccessRevenue(30000);
            salesPerson.GetSalary();

            Employee[] company = new Employee[]
            {
                firstManager,
                secondManager,
                salesPerson,
                firstContractor,
                secondContractor
            };

            CEO empl = new CEO("Ron", "Ronsky", 1500, company);

            double ceoSalary = empl.GetSalary();
            string infoCEO   = empl.PrintInfo();

            Console.WriteLine(infoCEO);
            Console.WriteLine($"Salary of CEO is: {empl.GetSalary()}");
            Console.WriteLine("Employees: ");
            empl.PrintEmployee();


            Console.ReadLine();
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            Employee[] company = new Employee[]
            {
                new Contractor("Bob", "Bobert"),
                new Contractor("Rick", "Rickert"),
                new Manager("Mona", "Monalisa"),
                new Manager("Igor", "Igorsky"),
                new SalesPerson("Lea", "Leova"),
            };

            CEO ceoName = new CEO("Ron", "Ronsky", company);

            Console.WriteLine("CEO:");
            ceoName.PrintInfo();
            ceoName.AddSharesPrice(1400);
            var getSalary = ceoName.GetSalary();

            Console.WriteLine($"Salary of CEO is:{getSalary}");
            ceoName.PrintEmployees(company);


            Console.WriteLine("------------------------------------------------");

            Manager manager = new Manager("Bob", "Bobsky");

            manager.PrintInfo();
            var bonusF = manager.AddBonus(1500);

            Console.WriteLine($"The bonus is: {bonusF}");
            var mSalary = manager.GetSalary();

            Console.WriteLine($"The salary with bonus is: {mSalary}");

            Console.WriteLine("------------------------------------------------");

            SalesPerson salesPer = new SalesPerson("Radmila", "Sokolovska");

            salesPer.PrintInfo();
            Console.WriteLine(salesPer.GetSalary());

            Console.WriteLine("------------------------------------------------");

            Contractor contractor = new Contractor("Petre", "Petreski");

            contractor.PrintInfo();
            Console.Write("Salary is: ");
            Console.WriteLine(contractor.GetSalary());

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Manager     manager1     = new Manager("Kate", "Kateson");
            Manager     manager2     = new Manager("Bob", "Bobson");
            SalesPerson salesperson1 = new SalesPerson("John", "Smith");
            Contractor  contractor1  = new Contractor("Bill", "Billson", 5.5, 300, manager1);
            Contractor  contractor2  = new Contractor("Jill", "Jillson", 3.5, 400, manager2);

            contractor1.GetSalary();
            contractor2.GetSalary();
            manager1.AddBonus();
            manager2.AddBonus();
            manager1.GetSalary();
            manager2.GetSalary();
            salesperson1.AddSuccessRevenue(25000);
            salesperson1.GetSalary();

            Employee[] company =
            {
                manager1,
                manager2,
                salesperson1,
                contractor1,
                contractor2
            };

            CEO ceoNumber1 = new CEO("Frank", "Frink", 2313, company);

            double ceoSalary = ceoNumber1.GetSalary();
            string infoCEO   = ceoNumber1.PrintInfo();

            Console.WriteLine(infoCEO);
            Console.WriteLine("Employees: ");
            ceoNumber1.PrintEmployees();
            Console.ReadLine();
        }