예제 #1
0
        static void Main(string[] args)
        {
            var      comp = new Company();
            Employee emp1 = new FullTimeEmployee("John", 5000);
            Employee emp2 = new PartTimeEmployee("Michael", 150.5, 18);
            Employee emp3 = new PartTimeEmployee("Thomas", 122.31, 27);

            Console.WriteLine(comp.GetMonthlySalaryTotal());

            comp.EmployNewEmployee(emp1);
            Console.WriteLine(comp.GetMonthlySalaryTotal());
            comp.EmployNewEmployee(emp2);
            Console.WriteLine(comp.GetMonthlySalaryTotal());
            comp.EmployNewEmployee(emp3);
            Console.WriteLine(comp.GetMonthlySalaryTotal());
        }
예제 #2
0
파일: Program.cs 프로젝트: roshkov/DNP_3Sem
        static void Main(string[] args)
        {
            var      comp = new Company();
            Employee emp1 = new FullTimeEmployee("John", 5000);
            Employee emp2 = new PartTimeEmployee("Michael", 150.5, 18);
            Employee emp3 = new PartTimeEmployee("Thomas", 122.31, 27);

            Console.WriteLine(comp.GetMonthlySalaryTotal());

            comp.EmployNewEmployee(emp1);
            Console.WriteLine(comp.GetMonthlySalaryTotal());
            comp.EmployNewEmployee(emp2);
            Console.WriteLine(comp.GetMonthlySalaryTotal());
            comp.EmployNewEmployee(emp3);
            Console.WriteLine(comp.GetMonthlySalaryTotal());
            PartTimeStudent empStudent = new PartTimeStudent("Nikita", 200.60, 110);

            empStudent.Register(2017);
            comp.EmployNewEmployee(empStudent);

            Console.WriteLine(comp.GetMonthlySalaryTotal());
        }