Hi, I am taking a class on java using netbeans, I have created this so far, but still getting an issue on this part:
public class Employee {
Here is my code so far:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package coursework;
/**
*
* @author csm
*/
public class Employee {
String firstName;
String lastName;
int employeeId;
double hourlyRate;
public Employee(String firstName,String lastName,int employeeId,double hourlyRate)
{
}
public void printEmpDetails()
{
System.out.println("Name: " + firstName + " " + lastName);
System.out.println("Emp. Id: " + employeeId);
System.out.println("Hourly Rate: $" + hourlyRate);
}
}
public class Employee {
public static void main(String[] args) {
Employee emp1 = new Employee("Henry", "Cook", 2350, 23.50);
Employee emp2= new Employee("Tyler", "Cook", 7080, 19.75);
emp1.printEmpDetails();
emp2.printEmpDetails();
}
}