String Empname;
double PayRate;
double HoursWorked;
double total;
...
// Create an instance of Employee with this data:
Employee employee = new Employee(Empname, hoursWorked, payRate);
Java will look for a constructor in Employee that matches this type signature:
class Employee {
...
public Employee(String arg1, double arg2, double arg3) {
...
}
...
}
Your Employee class can look like this:
class Employee {
String name;
double payRate;
double hours;
double total;
Employee(String name, double payRate, double hours) {
this.name = name
this.payRate = payRate;
this.hours = hours;
}
...
}