Creating Objects that Extend from one Class to put in array list
<p>I'm trying to write a payroll program that simply receives input, does some calculations and displays the output for EACH employee.</p>

<p>I have two types of employees, hourly and salary. I created a class for each type that extends to  an abstract employee class:</p>

<pre><code>public abstract class Employee{
  private String name;
  private String type;
  private  int hours;
  private double rate;
}


public class SalaryEmployee extends Employee{

  public SalaryEmployee(String type, String name, int hours, double rate){
   this.type = type;
    this.name = name;
    this.hours = hours;
    this.rate = rate;
  }

  public void print(){

  }
}
</code></pre>

<p>In my main method, when I try to create my objects using the code below:</p>

<pre><code>  Employee employee;
  if(type.equals("hourly"))
  {
    employee = new HourlyEmployee(type, name, hours, rate);
  }
  else
  {
    employee = new SalaryEmployee(type, name, hours, rate);
  }
</code></pre>

<p>I get the following error when I try to compile:</p>

<pre><code>Lab3.java:53: not a statement
        SalaryEmployee employee = new SalaryEmployee(type, name, hours, rate);
         ^
Lab3.java:53: ';' expected
        SalaryEmployee employee = new SalaryEmployee(type, name, hours, rate);
                      ^
2 errors
</code></pre>

<p>Any idea what is happening here? I've looked around for messing semi colons or braces, but haven't found anything yet.</p>

<p>Thanks for looking.</p>
