Hi there, having trouble getting this program to compile.
CODE
import java.io.*;
public class Employee
{
//declare variables
String FirstName;
String LastName;
String Position;
float Rate;
float Hours;
public Employee(String f, l, p float r, h)
{
//assigning identifiers with variables
FirsName = f;
LastName = l;
Position = p;
Rate = r;
Hours = h;
}
public Employee(String f,l,p)
{
//assign
FirstName = f;
LastName = l;
Position = p;
}
public String getFirstName()
{
return FirstName;
}
public String getLastName()
{
return LastName;
}
public String getPosition()
{
return Position;
}
public float getRate()
{
return Rate;
}
public float getHours()
{
return Hours;
}
}
Compiling Errors:
C:\Users\Patricia\Documents\Java Applications\Chapter05\Employee.java:20: <identifier> expected
public Employee(String f, l, p float r, h)
^
C:\Users\Patricia\Documents\Java Applications\Chapter05\Employee.java:55: ')' expected
}
^
C:\Users\Patricia\Documents\Java Applications\Chapter05\Employee.java:20: cannot resolve symbol
symbol : class l
location: class Employee
public Employee(String f, l, p float r, h)
^
C:\Users\Patricia\Documents\Java Applications\Chapter05\Employee.java:20: missing method body, or declare abstract
public Employee(String f, l, p float r, h)
^
4 errors
Tool completed with exit code 1