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()}");
        }
Ejemplo n.º 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()}");
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Employee    employee = new Employee("Goran", "Turundzov", Role.Other, 500);
            SalesPerson sitkac   = new SalesPerson("Zoran", "Turundzov", 2003);
            Manager     gazda    = new Manager("Elon", "Musk", 5000);

            sitkac.AddSuccessRevenue(400);
            gazda.AddBonus(5230);
            sitkac.AddSuccessRevenue(3000);

            Console.WriteLine(employee.GetInfo());
            Console.WriteLine(sitkac.GetInfo());
            Console.WriteLine(gazda.GetInfo());
        }
Ejemplo n.º 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()}");
        }
Ejemplo n.º 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.");
        }