Ejemplo n.º 1
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.º 2
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);

            Contractor gradba = new Contractor("Cile", "Cilevski", 60, 150, gazda);

            Console.WriteLine(gradba.GetInfo());
            Console.WriteLine(gradba.GetSalary());
            Console.WriteLine(gradba.CurrentPosition());
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Employee employee = new Employee();

            employee.FirstName = "Aleksej";
            employee.Salary    = 10000;

            var employeeSalary = employee.GetSalary();

            SalesPerson salesPerson = new SalesPerson();

            salesPerson.AddSuccessRevenue(3000);

            var salesPersonSalary = salesPerson.GetSalary();

            Manager manager = new Manager("Aleksej", "Gjoshevski", Domain.Enums.Role.Manager, 14500);

            manager.Department = "IT";
            manager.AddBonus(5000);

            var menagerSalary = manager.GetSalary();

            Contractor contractor = new Contractor();

            contractor.PayPerHour  = 2500;
            contractor.WorkHours   = 8;
            contractor.Responsible = manager;

            var contractorSalary = contractor.GetSalary();
            var department       = contractor.CurrentPosition();
        }
        static void Main(string[] args)
        {
            Employee employee = new Employee()
            {
                FirstName = "Marko",
                LastName  = "Markovski",
                Role      = RoleEnum.Manager
            };

            Console.WriteLine(employee.GetInfo());

            SalesPerson salesPerson = new SalesPerson("Bill", "Madison");

            salesPerson.AddSuccessRevenue(400);
            Console.WriteLine(salesPerson.GetSalary());

            Manager manager = new Manager("Vilie", "Peterson", 1200);

            Console.WriteLine(manager.GetSalary());
            manager.AddBonus(200);
            manager.AddBonus(300);
            Console.WriteLine(manager.GetSalary());

            Console.ReadLine();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            SalesPerson Darko = new SalesPerson()
            {
                FirstName = "Darko", LastName = "Stojanovski", Salary = 1000, Role = Role.Sales
            };

            Manager Dejan = new Manager()
            {
                FirstName = "Dejan", LastName = "Stefanovski", Salary = 3000
            };

            Employee Kristina = new Employee()
            {
                FirstName = "Kristina", LastName = "Mladenova", Salary = 800, Role = Role.Other
            };

            Darko.AddSuccessRevenue(1200);

            Dejan.AddBonus(1800);

            Darko.PrintInfo();
            Dejan.PrintInfo();
            Kristina.PrintInfo();

            Console.ReadLine();
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            Employee[] company = new Employee[]
            {
                new Menager("Bob", "Bobski"),
                new SalesPerson("John", "Dow"),
                new SalesPerson("Rick", "Brown")
            };

            Menager bob = (Menager)company[0];

            bob.AddBonus(5000);
            Console.WriteLine(bob.GetSalary());
            bob.PrintInfo();

            SalesPerson john = (SalesPerson)company[1];

            john.AddSuccessRevenue(5500);
            Console.WriteLine(john.GetSalary());
            john.GetSalary();
            john.PrintInfo();



            Console.ReadLine();
        }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            Employee employee = new Employee()
            {
                FirstName = "Bob",
                LastName  = "Bobsky",
                Role      = Role.Other
            };

            var employeeSalary = employee.GetSalary();

            SalesPerson salesPerson = new SalesPerson("Bill", "Billsky");

            salesPerson.AddSuccessRevenue(3500);

            var salesPersonSalary = salesPerson.GetSalary();

            Manager manager = new Manager("Elon", "Musk", 5000);

            manager.AddBonus(2000);

            var managerSalary = manager.GetSalary();

            Console.ReadLine();
        }
Ejemplo n.º 8
0
        static void Main(string[] args)
        {
            //Exercise 1
            //Create a class library project and in it create all classes
            //Create a class called Employee with the following properties:
            //    FirstName
            //    LastName
            //    Role - Enum {Sales, Manager, Other }
            //    Salary - protected, double
            //Create two methods:
            //    PrintInfo = Prints FirstName, LastName and Salary
            //    GetSalary - returns the salary


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

            Manager manager = new Manager("Marija", "Filipovska", 4500);

            manager.AddBonus(4000);

            Console.WriteLine($"The manager {manager.FirstName}, has salary: {manager.GetSalary()}$");


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

            SalesPerson salePerson = new SalesPerson("David", "Stojanovski");


            salePerson.GetSalary();

            salePerson.AddSuccessRevenue(2000);

            Console.WriteLine($"Sale Person {salePerson.FirstName}, has salary: {salePerson.GetSalary()}$ ");

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


            Employee employee = new Employee();

            employee.FirstName      = "John";
            employee.LastName       = "Doe";
            employee.RoleOfEmployee = Employee.Role.Other;
            var salaryOfEmployee = employee.GetSalaryOfEmployee(300);

            Console.WriteLine($"The salary of {employee.FirstName}, with role: {employee.RoleOfEmployee}, has salary: {salaryOfEmployee}$  ");
            // Without using method for setting Salary in class Employee, Salary = 0 because property Salary in class Employee is protected

            Console.ReadLine();
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            Employee bob = new Employee()
            {
                FirstName = "Bob", LastName = "Bobski", Role = Role.Sales
            };
            //bob.PrintInfo();

            SalesPerson john = new SalesPerson("John", "Doe");

            john.PrintInfo();
            Console.WriteLine(john.GetSalary());
            john.AddSuccessRevenue(4000);
            Console.WriteLine(john.GetSalary());

            Console.ReadLine();
        }
Ejemplo n.º 10
0
        static void Main(string[] args)
        {
            SalesPerson salesPerson = new SalesPerson("John", "Doe", 1500);
            Manager     manager     = new Manager("Bob", "Bobsky", 2500);

            salesPerson.AddSuccessRevenue(2000);
            double salesPersonSalary = salesPerson.GetSalary();

            // Console.WriteLine(salesPersonSalary);

            manager.AddBonus(200);
            manager.AddBonus(5000);
            double managerSalary = manager.GetSalary();

            Console.WriteLine(managerSalary);
            Console.ReadLine();
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            Employee emp = new Employee("Bob", "Bobsky");

            emp.Role = Role.Other;
            SalesPerson sale = new SalesPerson("Bill", "Billsky");

            emp.GetSalary(666);
            Manager manager = new Manager("Marija", "Prosheva", 300);

            sale.AddSuccessRevenue(2000);
            Console.WriteLine(emp.PrintInfo());
            Console.WriteLine(sale.PrintInfo());
            Console.WriteLine("Employee Salary: " + emp.GetSalary(666));
            Console.WriteLine("Sales Person Salary: " + sale.GetSalary(666));
            Console.WriteLine("Manager Salary :" + manager.GetSalary(444));
            Console.ReadLine();
        }
Ejemplo n.º 12
0
        static void Main(string[] args)
        {
            Employee theEmployee = new Employee("Poppy", "Willson", Role.Other, 400);

            theEmployee.PrintInfo();

            SalesPerson salesEmployee = new SalesPerson("John", "Doe", 500);

            salesEmployee.AddSuccessRevenue(2000);
            salesEmployee.PrintInfo();

            Manager managerEmployee = new Manager("Emily", "Johnson", 2000);

            managerEmployee.AddBonus(500);
            managerEmployee.PrintInfo();

            Console.ReadLine();
        }
Ejemplo n.º 13
0
        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();
        }
Ejemplo n.º 14
0
        static void Main(string[] args)
        {
            //FirstExercise
            Employee randomEmployee = new Employee("Jana", "Janevska", Role.Retailer, 700);

            randomEmployee.PrintInfo();


            //Secondexercise
            SalesPerson saleEmploy = new SalesPerson("Jovana", "Jovanovska");

            saleEmploy.AddSuccessRevenue();
            saleEmploy.PrintInfo();


            //ThirdExercise
            Manager managerEmploy = new Manager("Stefani", "Stefanovska", 3000);

            managerEmploy.AddBonus(200);
            managerEmploy.PrintInfo();


            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();
        }