Payroll Modification: Modify the payroll system of Figs 10.4-10.9 to include a private instance variable birthdate in the class Employee. Use the class Date of Fig 8.7 to represent an employee's birthday. Add get methods to the class Date. Assume that payroll is processed once per month. Create an array of Employee variables to store references to the various employee objects. In a loop, calculate the payroll for each Employee (polymorphically), and add a $100.00 bonus to the person's payroll amount if the current month is the one in which the Employee's birthdate occurs.
I have all the classes done and cannot get rid of the errors above. Any help?
91 92 93 94
/** * @param args the command line arguments */
public static void main(String[] args) {
Date currentDate = new Date(6, 20, 2010);
System.out.printf("Current Date is: %s\n", currentDate.toString());
System.out.println("###################################");
SalariedEmployee salariedEmployee = new SalariedEmployee("John", "Smith", "111-11-1111", new Date(5, 11, 1984), 800.00);
HourlyEmployee hourlyEmployee = new HourlyEmployee("Karen", "Price", "222-22-2222", new Date(6, 15, 1988), 16.75, 40);
CommissionEmployee commissionEmployee = new CommissionEmployee("Sue", "Jones", "333-33-3333", new Date(8, 25, 1974), 10000.00, 0.06);
BasePlusCommissionEmployee basePlusCommissionEmployee = new BasePlusCommissionEmployee("Bob", "Lewis", "444-44-4444", new Date(9, 21, 1978), 5000.00, 0.04, 300);
}
96 97 98 99 100
102
105 106 107
Output - Assignment 8 RC (run)
run: Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static variable t at assignment.pkg8.rc.Assignment8RC.main(Assignment8RC.java:398)
/Users/robertcoyne/Library/Caches/NetBeans/8.2/executor-snippets/run.xml:53: Java returned: 1
BUILD FAILED (total time: 4 seconds)