cannot find symbol contructor
import java.text.*;
public class Employee {
private String name;
private double salary;
private double bonus;
private double tax;
public Employee( String name, double salary) {
setSalary(name,salary);
}
private void setSalary(String n, double sly){
name = n;
salary = sly;
}
public String getName() {
return name;
}
public double getSalary() {
return salary;
}
public double getBonus() {
return bonus;
}
public double getTax() {
return tax;
}
public double getTotal() {
return salary*(bonus/100)*((100-tax)/100);
}
public String toString() {
return "\n\nName - " + getName() +
"\nSalary - " + getSalary() +
"\nBonus - " + getBonus() +
"\nTax - " + getTax() +
"\nSalary - " + getSalary();
}
}
public class EmployeeTest {
public static void main (String args [] ) {
Employee myEmployee = new Employee();
myEmployee.setName("Choo Lee Lee");
myEmployee.setSalary(5000);
System.out.println( name + "'s is RM" + salary );
myEmployee.setBonus(10);
System.out.println( "The bonus is " + bonus + "%" );
myEmployee.setTax(5);
System.out.println( "The tax is " + tax + "%" );
System.out.println( "The final salary of " + name + " is RM" + total);
}
}
can someone please check for me why the red part was under the error "cannot find symbol constructor Employee()".
Thanks
I am a beginner.