Ejemplo n.º 1
0
        public void Execute()
        {
            Employee e = new Employee(empid, name, address);
            PaymentClassification pc = MakeClassification();
            PaymentSchedule ps = MakeSchedule();
            PaymentMethod pm = new HoldMethod();

            e.Classification = pc;
            e.Schedule = ps;
            e.Method = pm;
            PayrollDatabase.AddEmployee(empid, e);
        }
Ejemplo n.º 2
0
 public void TestToString()
 {
     int empId = 2;
     Employee e = new Employee(empId, "TestEmployee", "TestAddress");
     e.ToString();
 }
Ejemplo n.º 3
0
 public void TestEmployee()
 {
     int empId = 1;
     Employee e = new Employee(empId, "Bob", "Home");
     Assert.AreEqual("Bob", e.Name);
     Assert.AreEqual("Home", e.Address);
     Assert.AreEqual(empId, e.EmpId);
 }
Ejemplo n.º 4
0
 protected override void Change(Employee e)
 {
     e.Address = newAddress;
 }
Ejemplo n.º 5
0
 protected abstract void Change(Employee e);
Ejemplo n.º 6
0
 public static void AddUnionMember(int id, Employee e)
 {
     unionMembers[id] = e;
 }
Ejemplo n.º 7
0
 public static void AddEmployee(int id, Employee employee)
 {
     employees[id] = employee;
 }
 protected override void Change(Employee e)
 {
     e.Classification = Classification;
     e.Schedule = Schedule;
 }
Ejemplo n.º 9
0
 protected override void Change(Employee e)
 {
     e.Name = newName;
 }