for (int i = 0; i < staff.size(); i++) { Employee e = (Employee)staff.get(i); e.raiseSalary(5); }
for (int i = 0; i < staff.size(); i++) { Employee e = (Employee)staff.get(i); System.out.println(e); } }
}
class Employee { public Employee(String n, double s, int year, int month, int day) { name = n; salary = s; GregorianCalendar calendar = new GregorianCalendar(year, month - 1, day); hireDay = calendar.getTime(); }