import java.util.ArrayList;

/** Una planilla con empleados de dos clases, recorrida como Employee. */
public class PayrollDemo {

    public static void main(String[] args) {
        ArrayList<Employee> staff = new ArrayList<>();
        staff.add(new SalariedEmployee("alice", 350_000));
        staff.add(new HourlyEmployee("bob", 1_250, 96));

        long total = 0;
        for (Employee e : staff) {
            IO.println(e.payslip());
            total += e.monthlyPay();
        }
        IO.println("Total de la planilla: " + total + " céntimos");
    }
}
