I am getting some "cannot find symbol" errors while trying to complile this java program and I am confused as to what is wrong. Here is a sample of the code...
public Employee(String empName, double hourlyRate, double regHours, double grossPay, double regPay, double netPay, double taxes, double otHours, double otPay, double totHours) {
setEmpName(empName);
setHourlyRate(hourlyRate);
setRegHours(regHours);
setGrossPay(grossPay);
setRegPay(regPay);
setNetPay(netPay);
setTaxes(taxes);
setOtHours(otHours);
setOtPay(otPay);
setTotHours(totHours);
}
//Set access methods
public void setEmpName( String newEmpName ) {
empName = newEmpName;
public String getEmpName() {
return empName;
}
I am getting errors on both the set and get methods, but cant figure out what I have done wrong.
EDIT: Here is what the compiler shows me for each line....there is a little arrow point to the lower case "e" on both empName statements.
error: cannot find symbol empName = newEmpName;
error: cannot find symbol return empName;