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()}");
        }
示例#2
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()}");
        }
示例#3
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();
        }
示例#4
0
        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);

            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($"SalesPerson salary: {salesPerson.GetSalary()}");
            Console.WriteLine($"Manager salary: {manager.GetSalary()}");
        }
示例#5
0
        static void Main(string[] args)
        {
            ///---Task 01---

            Employee    employee    = new Employee("Bob", "Bobsky", Role.Other, 600);
            SalesPerson salesPerson = new SalesPerson("Bill", "Billsky", 1500);
            Manager     manager     = new Manager("Elon", "Musk", 5000);
            Contractor  contractor1 = new Contractor("Jeff", "Besos", 170, 11, manager);
            Contractor  contractor2 = new Contractor("Mark", "Raffalo", 155, 9, manager);



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

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



            Console.WriteLine($"{ contractor1.FirstName} - { contractor1.CurrentPosition("marketing")}");
            Console.WriteLine($"{ contractor2.FirstName} - { contractor2.CurrentPosition("IT")}");


            Console.WriteLine($"Employee salary: {employee.GetSalary()}");
            Console.WriteLine($"SalesPerson salary: {salesPerson.GetSalary()}");
            Console.WriteLine($"Manager salary: {manager.GetSalary()}");
            Console.WriteLine($"First Constructor is {contractor1.FirstName} and his/her salary is: {contractor1.GetSalary()}");
            Console.WriteLine($"Second Constructor is {contractor2.FirstName} and his/her salary is: {contractor2.GetSalary()}");

            ///--Task 02---



            Ceo ceo = new Ceo("Steve", "Jobs", 70, 340);

            Console.WriteLine($"{ceo.GetInfo()}");
            Console.Write($"The ceo has salary of: {ceo.GetSalary()} dolars.");
        }
示例#6
0
        static void Main(string[] args)
        {
            Manager john = new Manager("John", "Doe");

            john.AddBonus(1000);
            john.GetSalary();
            Manager boki = new Manager("Boki", "Bobov");

            boki.AddBonus(1200);
            boki.GetSalary();
            Contractor koki = new Contractor("Koki", "Kokov", john, 40);

            koki.GetSalary();
            Contractor viki = new Contractor("Viki", "Vikova", boki, 50);

            viki.GetSalary();
            SalesPerson martin = new SalesPerson("Martin", "Martinov");

            martin.ExtendSuccessRevenue(3000);
            martin.GetSalary();

            Employee[] companyEmployees =
            {
                john,
                boki,
                koki,
                viki,
                martin
            };

            Ceo trump = new Ceo("Donald", "Trump", 7000, companyEmployees);

            trump.AddSharesPrice(100);
            trump.GetSalary();
            trump.PrintInfo();
            trump.PrintEmployees();



            Console.ReadLine();
        }